These pages cover ANTS Memory Profiler 10, which is not the latest version. Help for other versions is also available.

Fragmentation notices

This page applies to ANTS Memory Profiler 8.2 only.

Fragments are blocks of unused memory. On the small object heaps (Generation 0, 1 and 2), fragmentation isn't a problem, because the fragments are compacted during a garbage collection. However, the large object heap (LOH) isn't compacted for performance reasons, so the LOH can become fragmented. 

To give an indication of whether fragmentation is causing a problem for your application, ANTS Memory Profiler looks at the following:

  • Total size of LOH = total memory allocated to the LOH
  • Fragmentation ratio = size of the largest fragment on the LOH : total size of all fragments on the LOH
  • Free space ratio = total size of all fragments on the LOH : total size of LOH
  • Number of fragments larger than 64k 

Depending on these ratios, an appropriate message is displayed:

  • No problems with large object heap fragmentation are detected.
    The total size of the LOH is less than 32MB, or the free space ratio is less than 0.1:1.
  • Fragmentation is restricting the size of objects that can be allocated.
    The fragmentation ratio is less than 0.3:1, ie, the largest fragment is very small.
  • Fragmentation is affecting the size of the largest object that can be allocated.
    The fragmentation ratio is less than 0.6:1, and greater than 0.3:1, ie, the largest fragment is fairly small.  
  • Fragmentation may be causing .NET to reserve too much free memory.
    The free space ratio is greater than 0.7:1, and there are more than three fragments larger than 64k.
    ie most of your application's memory is free space, and there are several large fragments.
  • Fragmentation may be causing .NET to reserve too much free memory.
    The free space ratio is less than 0.7:1, and greater than 0.4:1, and there are more than three fragments larger than 64k.
    ie a large amount of your application's memory is free space, and there are several large fragments. 
  • There are many large fragments; fragmentation may become an issue over time.
    There are more than ten fragments larger than 64k.

Didn't find what you were looking for?