Memory Profiler and Task Manager
johnny cheesedog
Posts: 2
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.
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.
Comments
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.