title: Virtual Size causing program to run out of memory
body: <p>A server application I'm working on built using C++ on Windows runs out of memory when Virtual Size reaches somewhere around 2GB (32-bit application, with large address aware enabled). I notice, however, that Private Bytes is significantly smaller. The current statistics are:</p>
  
  <p>Virtual Size: 2.6GB
  Private Bytes: 1.6GB</p>
  
  <p>The difference in these two numbers is 1GB. So my questions are:</p>
  
  <ol>
  <li>What does this 1GB difference represent?</li>
  <li>Is my application running out of memory due to Virtual Size or Private Bytes?</li>
  </ol>
  
  <p>I've also run my application through the VMMap utility and I notice that "Private Data" is usually an order of magnitude higher than the committed size. In other words, total size for Private Data might be 200MB, but the committed size is only 20MB. I'm not really sure what private data is, but based on my research so far it seems to indicate it's just part of the heap.</p>
  
  <p>EDIT:</p>
  
  <p>I've looked for memory leaks using Purify but I've not really found anything useful. Memory leaks in the form of memory without pointers doesn't seem to be the problem, but memory leaks in terms of memory being held onto for too long might be an issue, i haven't looked into that yet. However, the key is understanding why Virtual Size is causing the out of memory issues. Question #1 is the most important for me to understand this.</p>