Windows 7 x64 Out of Memory Error - With over 1GB still available [duplicate]

I've been getting sporadic "Out of Memory" popups while playing games in fullscreen windowed mode lately (namely Arma 3 and BF4). I didn't get these before switching from fullscreen to fullscreen windowed, but it may be unrelated. However, when these warnings pop up, I usually jump into Resource Monitor to have a look at the current state of my system memory, and there's always less than 2GB being used by the game in question, and still 1-3GB still in standby.

Is this normal to have it pop up this early, or is Resource Monitor displaying my available memory wrong (or, do I not understand what the "Standby" portion is)? It appears to be a legitimate issue, because I tend to get notifications of failed memory allocation by other programs at the same time.

I'm running 64-bit Windows 7, and have 8GB of RAM installed.


You are confusing virtual memory with physical memory. The "out of memory" pop up is reporting a shortage of virtual memory. You can have lots of free physical memory and still have a shortage of virtual memory. The usual solution is to configure a larger paging file.

To use a somewhat simplified analogy, physical memory is like money in the bank, virtual memory is like the balance in your checkbook. You can have plenty of money in the bank, but if the balance in your checkbook is low, you can't safely write any more checks.

A paging file is like a line of credit that you can use to cover checks if you run low on money in the bank. With a line of credit, you can keep writing checks even if the balance in your checkbook is low. The paging file can cover a "run on the memory bank" in the unlikely event all the outstanding checks are cashed at once.

The paging file allows the operating system to keep permitting allocations of virtual memory even if the operating system never has to use it. It ensures that should all the outstanding allocations of virtual memory require physical memory all at once, the operating system won't be forced to break the promises it has already made.