Checking managed memory usage
Published 14 May 2018
Before checking for managed memory usage, we recommend that you first check for large object heap fragmentation and use of unmanaged memory.
If you are not familiar with memory profiling, you might find it helpful to read about the .NET heaps before you start.
There are a number of different techniques that can be used to check for managed memory usage, and, as you become more experienced at using ANTS Memory Profiler, you will discover the best ways to profile your code. Generally, the two main investigations are:
- Finding out what is using most memory.
Do this if you think that the application is using too much memory. - Finding and fixing a memory leak.
Although the .NET Garbage Collector is designed to dispose of objects so that you do not have to, mistakes in your code (or third-party code) can lead to leaking objects. Check for a leak if you see that memory usage increases whenever you carry out a specific action repeatedly.