What are the challenges you face when working across database platforms? Take the survey

Memory Profiler and Task Manager

I'm confused about the mismatch between the memory profiler and task manager.

On one app, task manager shows it using 80-110MB of memory, every time, while profiler shows the app using 8-15MB of memory and never more.

On another app, Task manager shows it using 56MB, while ANTS shows 1.5MB. I don't run native code so I'm really confused about the discrepancy. The programs I'm profiling use a lot more memory than a simple .NET program so I'm wondering what's going on.


  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi Johnny,

    Task Manager shows the total memory used by the program, including all unmanaged/COM code, and the .NET runtime itself. ANTS Profiler shows only what was allocated on the managed heap. This corresponds to the performance counter '#bytes in all heaps' of the performance object '.NET CLR Memory' that you can access from perfmon.exe.

    Typically, the .NET runtime will allocate much more memory than needed to give the managed code 'breathing space' without having to ask the OS for more memory.
Sign In or Register to comment.