Managed heaps

The managed heaps are divided into the Generation #0 to Generation #2 heaps, the large object heap and overhead.

Generation Heaps and Large Object Heap

The generation heaps and the large object heaps are further divided into “Data”, “Holes,” and “Unreachable”.

“Data” represents memory that is actually used by an allocated instance.

“Holes” represent memory that is unused between two allocated instances. “Holes” appear when the heap is not fully compacted, due to pinned instances or optimizations in the garbage collector.

 “Unreachable” represents memory that is currently used by an allocated instance, but the instance is not reachable from any root. “Unreachable” instances may appear after a generation #0 or a generation #1 collection, since not all instances are collected.

NOTE 1! Unreachable instances are only identified if a full reachability analysis is performed by the profiler at each GC. A full reachability analysis is performed when real-time data are being collected. Otherwise, unreachable instances will be presented as “Data.”

NOTE 2! When using delayed instance cleanup or viewing the memory of a snapshot, there will be no generation #0 or generation #1 data and no (or very few) “holes” in the generation #2 heap. The reason for this is that a generation #2 collection has been performed before the native memory snapshot. When a heap snapshot is collected, a generation #2 collect is always performed, and when using delayed instance cleanup, a generation #2 collection has to be performed so that the profiler knows what instances are still alive.

NOTE 3! Since the garbage collector has to look at all instances for references to other instances, most instances will be mapped to physical memory. Thus, the Physical memory view and Committed memory view of the GC heap will be mostly the same. Large unused instances (larger than the page size of 4096 bytes) that contain no references may be swapped out to the page file in a low memory condition (or if the Trim working set button is pressed).

Overhead

The Overhead node presents the memory used by the GC heap that is not mapped to the generation heaps or the large object heap.

This includes any bookkeeping data needed by the garbage collector as well as memory that is available for future allocations.

Memory that comes directly after a generation #0 heap is assumed to be available for future allocations and is presented as “Extra” under the Overhead node. All other overhead memory is presented as “Other” under the Overhead node.

 

 

.NET Memory Profiler User Manual

© Copyright 2002-2008. SciTech Software AB.

For information about .NET Memory Profiler, see the product site at http://memprofiler.com

.NET Memory Profiler is developed by SciTech Software AB