My files compiled in Mx run out of memory (more precisely, my mxMalloc calls sometimes return NULL ). By quick calculation, I estimate that my files request mxMalloc only about 500 MB of memory (maybe up to 1 GB), and I run my files on a 64-bit Linux machine with 16 GB of memory, on which Matlab runs almost exclusively, However less, mxMalloc quite often returns NULL .
I suppose there are several reasons why this might happen (memory fragmentation, etc.), but in any case, 500 MB does not seem to be much to ask for 16 GB of memory.
I believe that my mxMalloc calls request memory from the Matlab heap, but I'm not 100% sure ( mxMalloc requests are processed by Matlab in the end, and not directly to the OS). So, is there a way to increase the heap size of my mex file?
thanks
source share