Page 1 of 1
Not all memory reported in profiler
Posted: Fri Nov 02, 2012 6:17 am
Hi, I have collected a snapshot from a process that seems to be leaking memory (using the nmpCore). When I look in task manager, it reports the process using over 1 gig of memory, however when I load the snapshot into the memory profiler gui, the total of the total live bytes only shows just over half a gig.
Would any one know why we don't see the same total value in here as task manager reports?
Thanks in advance for an help,
Re: Not all memory reported in profiler
Posted: Fri Nov 02, 2012 12:54 pm
When you collect a snapshot, the profiler forces the .NET runtime to cleanup as much memory as possible (by performing multiple garbage collections and allowing finalizers to run). This avoids presenting instances that are eligible for garbage collection, but it will also decrease the amount of memory used by the instances in the snapshot. To get information about all memory used by the process, you can use the Native memory page. Under this page, all memory used by the process is presented, including managed memory used by live instances, unused managed memory, and the unmanaged memory usage.
You can get more information about the total managed memory usage by collecting the snapshot using the "Collect gen #0 snapshot" command, or by collecting a peak snapshot
. A gen #0 snapshot will not perform any heap cleanup, and will include information about unreachable instances. A peak snapshot also includes information about instances collected by the garbage collector.
To get information more information about unmanaged memory usage, you can try to enable the unmanaged resources tracker