title: Help understanding Windows memory - "Working Set"
body: <p>I've been tracking down a few memory leaks in my application. It's been a real pain, but I've finally tightened everything up. However, there's one bit of Windows memory management that is confusing me. Here is a printout of the app's memory usage over time...</p>
  
  <pre><code>Time        PrivateMemorySize64        WorkingSet64
  20:00:36    47480,                     50144
  20:01:06    47480,                     50144
  20:01:36    47480,                     50144
  20:02:06    47480,                     149540
  20:02:36    47480,                     149540
  20:03:06    47480,                     149540
  </code></pre>
  
  <p>The working set jumped from 49 MB to 146 over a span of 30 seconds. This happened overnight as the application was basically doing nothing.</p>
  
  <p>The working set (which is what task manager shows me) seems to be able to be influenced by other applications such as debuggers (as I learned while looking for memory leaks). After reading the documentation on what Working Set is, I still don't have a good understanding. </p>
  
  <p>Any help is appreciated.</p>
  
  <p><strong>Update</strong>: Thanks to some links from responders as well as some additional searching, I have a better understanding on how a separate process can cause my process' working set to grow. Good to know that a spike in the working set is not necessarily an indication that your app is leaking... Further reason to not rely on Task Manager for memory evaluation :)</p>
  
  <p>Helpful links: </p>
  
  <p><a href="http://getgreenshot.org/2010/07/24/a-few-words-on-memory-usage-or-working-set-vs-private-working-set/" rel="noreferrer">A few words on memory usage or: working set vs. private working set</a></p>
  
  <p><a href="http://cybernetnews.com/cybernotes-windows-memory-usage-explained/" rel="noreferrer">CyberNotes: Windows Memory Usage Explained</a></p>