QB64.org Forum
Active Forums => QB64 Discussion => Topic started by: Cobalt on September 10, 2018, 08:20:15 pm
-
it seems that I can only allocate approx 269megs of ram to a QB64 program using Windows. [banned user] had no trouble in Linux running this test sample.
but when I try it gives an Out Of Memory error if I reduce the array size down to where the 536*N<~282000000 then it works for me.(which is about ~528000) Task Manager gives nearly 2000megs free so its not an insufficient memory issue.
Any Idea why its a problem in windows, can anybody else running windows (vista or 7) try and see if they receive a memory error too? see if maybe its just my machines(does this on both desktops and both laptops running Vista and 7).
-
QB64 on macOS has no issue with the code above either, so we can isolate the issue to Windows indeed.
Wonder if the folks with the 64bit compiler injected by Steve will get the same crash.
-
OK here
-
What system? What version of QB64? Is it Steve's mod?
-
What system? What version of QB64? Is it Steve's mod?
It is. You can tell by the title being "QB64 x64" in the screenshot.
-
Yes 64 x 64 and this: v1.2 2018 0228/86 git b30af92
-
Oh, there's a screenshot.
I'm always in the "Recent posts (http://www.qb64.org/forum/index.php?action=recent)" page and don't get to see attachments unless I click the post to read it.
Ok.
-
Well, I'm in Windows 10 with Steve's x64 newest version, and I put in 1G with no problems.
-
Well, I'm in Windows 10 with Steve's x64 newest version, and I put in 1G with no problems.
I've got a few massive QBDbases which hold around 20GB of data... They all load and run fine under QB64 x64. ;)
-
I may need a copy of that.
though its not like I'm exceeding 4gigs not even close. so 32bit should be plenty, you would think.
-
I may need a copy of that.
though its not like I'm exceeding 4gigs not even close. so 32bit should be plenty, you would think.
Do you use _TRIM allot?
-
I may need a copy of that.
though its not like I'm exceeding 4gigs not even close. so 32bit should be plenty, you would think.
32-bit actually limits you to (supposedly) 2GB, though in actuality, it's closer to 1.5GB of memory in most cases, as Windows reserves a certain amount of space with each program for itself. Just try a simple program to see when "Out of Memory" pops up for you:
DIM m AS _MEM, sz AS _INTEGER64
DO
sz = sz + 10000000 '10 million bytes at a time
PRINT sz
m = _MEMNEW(sz) 'reserve a data space of proper size
_MEMFREE m
LOOP
Run it and let it go until it crashes. In 32-bit versions of QB64, I'd bet for an "out of memory" error before it gets to 1.5GB usage. (Have Task Manager up as well, and you can watch the size there constantly increase until crashage as well.)
For anything more than 1GB, I'd recommend using the 64-bit version of QB64. Why your 32-bit version is crashing at 500MB is beyond me. I've never had a program give me the "out of memory" issue, without using over 1GB RAM before.
-
Cobalts code did get Out of Memory for me in the Beta 32 Version on Windows 10.
-
Run it and let it go until it crashes. In 32-bit versions of QB64, I'd bet for an "out of memory" error before it gets to 1.5GB usage. (Have Task Manager up as well, and you can watch the size there constantly increase until crashage as well.)
For anything more than 1GB, I'd recommend using the 64-bit version of QB64. Why your 32-bit version is crashing at 500MB is beyond me. I've never had a program give me the "out of memory" issue, without using over 1GB RAM before.
program illegal function calls at 2,150,000,000 although in task manager never uses more than 32megs ram.
-
Steve, is there anyway I could just put that TYPE record straight into a MEM block or would I have to put each element in one at a time, and handle it one element at a time while sorting?
like
_MEMPUT m, m.offset+(RecNumb&*536), FF(RecNumb&)
or would it need to be
_MEMPUT m, m.offset+(RecNumb&*536), FF(RecNumb&).NameL
_MEMPUT m, m.offset+(RecNumb&*536)+256, FF(RecNumb&).Directory
_MEMPUT m, m.offset+(RecNumb&*536)+512, FF(RecNumb&).Size
_MEMPUT m, m.offset+(RecNumb&*536)+516, FF(RecNumb&).DateStamp
_MEMPUT m, m.offset+(RecNumb&*536)+526, FF(RecNumb&).TimeStamp
_MEMPUT m, m.offset+(RecNumb&*536)+534, FF(RecNumb&).IS_Directory
_MEMPUT m, m.offset+(RecNumb&*536)+535, FF(RecNumb&).IS_File