title: .NET CLR Memory "Bytes in all heaps" is much lower than "Gen 0 heap size"
body: <p>I am looking at performance counters for may ASP.NET 4 Application (Workflow Service)</p>
  
  <pre><code>.NET CLR Memory -- # Bytes in all Heaps :    44,420,488
  .NET CLR Memory -- Gen 0 heap size :        311,665,568
  .NET CLR Memory -- Gen 1 heap size :         17,723,080
  .NET CLR Memory -- Gen 2 heap size :         25,956,920
  .NET CLR Memory -- Large Object Heap size :     740,488
  </code></pre>
  
  <p>Description on "# Bytes in all Heaps" counter </p>
  
  <blockquote>
    <p>This counter is the sum of four other counters; Gen 0 Heap Size; Gen 1 Heap Size; Gen 2 Heap Size and the Large Object Heap Size. This counter indicates the current memory allocated in bytes on the GC Heaps.</p>
  </blockquote>
  
  <p>Notice that it says "sum of four other counters" not just "sum of bytes allocated on four other heaps", which would make sense, since there are 0 bytes in Gen 0 heap after a Gen 0 garbage collection.</p>
  
  <p>I noticed that in my case #Bytes in all Heaps is precisely Gen 1 + Gen 2 + Large Object Heap. Is this a bug? Or am I miss reading the numbers?</p>
  
  <p>Windows 7 Enterprise, Performance Monitor 6.1.7601</p>