# Heap Size vs Bytes in all Heaps

**URL:** <https://community.dynatrace.com/t/heap-size-vs-bytes-in-all-heaps/11670>\
**Category:** Open Q&A\
**Tags:** dotnet\
**Created:** [April 9, 2018, 11:02pm UTC](https://community.dynatrace.com/t/heap-size-vs-bytes-in-all-heaps/11670 "2018-04-09T23:02:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tarun\_agastya1](https://avatars.discourse-cdn.com/v4/letter/t/ecccb3/32.png) [@tarun\_agastya1](https://community.dynatrace.com/u/tarun_agastya1)\
**Post date:** [April 9, 2018, 11:02pm UTC](https://community.dynatrace.com/t/heap-size-vs-bytes-in-all-heaps/11670/1 "2018-04-09T23:02:11Z")

</div>

Hi,

can someone provide the difference between Heap size vs Bytes in all heaps for .NET Measure.

As per my understanding Bytes in all heaps is Gen 1+Gen 2+Large object heap.

Thanks

---

<div class="post-metadata">

**Author:** ![michael\_mayr](https://avatars.discourse-cdn.com/v4/letter/m/ec9cab/32.png) [@michael\_mayr](https://community.dynatrace.com/u/michael_mayr)\
**Post date:** [June 27, 2018, 11:32am UTC](https://community.dynatrace.com/t/heap-size-vs-bytes-in-all-heaps/11670/2 "2018-06-27T11:32:00Z")

</div>

Hi [@Tarun A.](https://answers.dynatrace.com/users/13831/view.html),

your’re right, Bytes in all heaps is the sum of Gen 1 Heap size + Gen 2 Heap Size and the Large Object Heap Size. These values are collected from the corresponding performance counters. The documentation for these counters can be found in the [official microsoft documentation](https://docs.microsoft.com/en-us/dotnet/framework/debug-trace-profile/performance-counters#memory).

Regards,  
Michael
