ANTS Memory Profiler 7

Understanding memory problems

Most types of memory problem that you encounter are one of the following kinds. Working out which kind of problem you have may help you start to locate and resolve your problem.

  • Managed memory leaks
    The typical symptom of a memory leak is that the performance degrades while the program runs; performance recovers on restart and then degrades again. The amount of bytes in the .NET heap increases.
  • Unmanaged object leaks
    The performance degrades while the program runs; this recovers on restart and then degrades again. The number of private bytes (the amount of real and paged memory requested by the program) in use often increases at a greater rate than the number of bytes in the .NET heap.
  • Fragmentation of the large object heap
    The main symptom of fragmentation is that OutOfMemory exceptions are thrown even though there is sufficient space on the .NET heap.
  • Large RAM footprint
    Some programs need to use a lot of memory. There is little specific advice that can be given about this, since the best approach to reducing the amount of memory used will depend on your program's requirements. Using a profiler may give you suggestions for where to optimize code by showing which parts of your program are using the most memory.

If you are not familiar with memory profiling, you might find our .NET Memory Primer useful before you start. 


Didn't find what you were looking for?