Working with the Summary tab
Published 18 December 2012
The Summary page shows a summary of how your application was using memory when you took the current snapshot.
The Summary page is divided into four areas:
Total size of live objects
The following information is shown:
- Total size of objects in baseline snapshot (Snapshot Name) - The amount of memory being used by the .NET heaps at the time of the baseline snapshot.
- Total size of objects in (Snapshot Name) - The amount of memory being used by the .NET heaps in the current snapshot.
- Difference between (Current Snapshot name) and (Baseline snapshot name) - Difference between the two.
If you have not selected a baseline snapshot, or if you have only taken one snapshot, the Total size of objects in baseline snapshot and Difference between snapshots are unavailable.
Use this information to check how memory usage has changed between the snapshots. To change the snapshots being compared, under the timeline, use the Snapshot: and Current: dropdown lists. You can name the snapshots; see Working with the timeline.
Memory fragmentation
The following information is shown:
- Total number of fragments - The amount of fragmentation.
- Number of large fragments - Having many large fragments increases the likelihood of memory problems. ANTS Memory Profiler also shows the percentage of total free memory accounted for by large fragments. If the number of large fragments is high, and the percentage of free memory accounted for by those fragments is also high, problems are likely to occur sooner.
- Wastage due to small fragments - Small fragments are not bad. They are just an indication that the garbage collection is not compacting the heaps appropriately. If the percentage of free memory accounted for by small fragments is high, you probably do not have a problem with large object heap fragmentation.
- Largest fragment - The size of the largest block of unused memory that is currently reserved for .NET.
- The profiler's interpretation of this data.
'Fragment' here means 'block of unused memory'.
If you are not used to memory profiling, we recommend that you start by checking for large object heap fragmentation.
If you are profiling an assembly with more than one process
The .NET heaps and garbage collector exist per process, and so it would be meaningless to analyze fragmentation across multiple processes. Use the Process: dropdown to choose the process to display fragmentation for. The Process: option is not displayed if your application only has one process.
A process followed by an exclamation mark (!) after its name was not running when the current snapshot was taken (either because it had already finished, or because it had not yet started).
.NET and unmanaged memory
This pie chart shows the memory used by your program when the current snapshot was taken. If you do not have large object heap fragmentation, use this pie chart to identify whether your problem is caused by an unmanaged or a managed memory problem.
- Generation 1 - The size of objects stored on the generation 1 heap (objects that have survived at least one garbage collection). Click the pie chart segment, or the Generation 1 label, to show the classes on the generation 1 heap in the Class List.
- Generation 2 - The size of objects stored on the generation 2 heap (long-lived objects that have been promoted from the generation 1 heap). Click the pie chart segment, or the Generation 2 label, to show the classes on the generation 2 heap in the Class List.
- Large Object Heap - The size of objects stored on the large object heap (mainly arrays larger than 85kB). Click the pie chart segment, or the Large Object Heap label, to show the classes on the large object heap in the Class List.
- Unused memory allocated to .NET - The amount of memory which is currently available for .NET.
- Unmanaged - The amount of unmanaged memory used by your program.
The generation 0 heap is not shown because taking a snapshot forces a garbage collection.
Largest classes
After you have determined that you have a problem in the managed memory, and if you are not sure which class is causing the problem, we recommend that you investigate the largest classes. For more information, see Finding out what is using most memory.