title: How to calculate private working set (memory)?
body: <p>How do I calculate the private working set of memory using C#?  I'm interested in producing roughly the same figures as <code>taskmgr.exe</code>.</p>
  
  <p>I'm using the <code>Process</code> namespace and using methods/data like <code>WorkingSet64</code> and <code>PrivateMemorySize64</code>, but these figures are off by 100MB or more at times.</p>