Reputation: 300
I am using code::blocks to compile a C program. The PC is: Windows 8.2 64b with 32GB of RAM + 32GB of swap if needed. I need 24GB to store intermediate values to have the program running fast enough (around X12 faster).
I need to allocate around 240 blocks of 100MB each. The malloc returns NULL at the 19th block (there are some other small blocks) so total is 2GB.
Is there a way to compile/link the program to be able to allocate this memory? An other tool than code::blocks? (I did it with Matlab, it works fine, no problem of memory but Matlab is really slower than compiled C).
Best regards. Mich.
Upvotes: 0
Views: 927
Reputation: 213321
You need to build it as a 64 bit application, since 32 bit Windows applications have a restricted amount of 4 Gb addressable memory, lots of that being reserved for OS etc. Also, I don't think MinGW 32 bit is maintained any longer(?)
Upvotes: 1