I set the size of the virtual memory to be managed by system. While there is ample space on the disk, I ran into the 'out of memory' error, contrary to my assumption that the system should just allocate more virtual memory in this case. So what is Windows automatic virtual memory allocation policy? Also does Windows require the memory used by a single process to be fit into the physical memory even if some threads are idle?

My problems is for Windows x64 in general (if it has to be specific, then it is Win 8.1, 16GB RAM, doing scientific computing).

EDIT: To be more specific, the softwares are MATLAB R2015a (win64) and Gurobi 6.0.5 (win64). Both of them had such errors in different cases. I don't think they have anything to do with 32-bit stuffs. Also I think the error simply means that the memory allocation function (say new or malloc) returns something invalid.

  • Is the process doing your calculations 32-bit or 64-bit? – misha256 Sep 22 '15 at 0:46
  • Everything is 64-bit – LeOpArD Sep 22 '15 at 0:48
  • Hmm, what kind of scientific application are you using? Does it have a name, version, or if it's something you wrote yourself, what language and compiler are you using? Also, do post a screenshot of the error you're getting, or more detailed error information if you can. We'll get to the bottom of this! ;-) – misha256 Sep 22 '15 at 1:26
  • "Out of memory" could be referring to virtual or physical memory or even swap space (what MS incorrectly labels "virtual memory"). You need to provide more details. See superuser.com/questions/748743/… – sawdust Sep 22 '15 at 1:36
  • @sawdust Indeed. In fact, "out of memory" could mean virtually anything, especially if the error is being thrown by the application rather than the OS. I've seen an application say "Not enough RAM" because it (arbitrarily) couldn't handle more than 99 open files concurrently. That was clearly a limitation of the application, not of the system. And what a misleading error message! – misha256 Sep 22 '15 at 1:47

Most likely the process doing the calculations is in fact 32-bit. Such processes are limited to addressing a maximum of 2GB to 4GB, (depending on how the application is compiled) regardless of whether the OS is 32-bit or 64-bit.

If the application uses the .NET framework, other limitations come into play, even if the application is 64-bit. Unless you're purring away with .NET 4.5 or later that is.

Lastly, even pure 64-bit applications run into problems if they haven't been coded properly. I've seen 64-bit applications crash because, internally, they still work with 32-bit variables for things like indexes. When you push such an application too far (like try insert a 4,294,967,297th item) you get an inevitable crash, even though there's plenty of RAM to spare.

Here's some good documentation from MS on how Windows expands the page-file when necessary:

when the system commit charge is more than 90 percent of the system commit limit, the page file is increased to back it. This continues to occur until the page file reaches three times the size of physical memory or 4 GB, whichever is larger. This all assumes that the logical disk that is hosting the page file is large enough to accommodate the growth.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.