Increased memory usage of SL app when using ANTS?

Memory profiling for .NET developers

Moderators: Luke Jefferson, StephenC, AndrewH, melvyn.harbour, james.billings, Laura Morley, dene.boulton

Increased memory usage of SL app when using ANTS?

Postby ergu » Thu Dec 01, 2011 11:12 pm

The total memory usage of my app is higher (by observing task manager) when using ANTS than when launching the SL app by itself.

The difference is significant. I am looking at the difference between 2 snapshots and when using ANTS that difference is around 30 MB, but only 15 MB without ANTS.
ergu
 
Posts: 6
Joined: Tue Nov 29, 2011 4:32 am

Postby AndrewH » Mon Dec 05, 2011 12:22 pm

Task manager displays 'working set', which is not the same as 'total memory usage': it can be higher or lower depending on what's going on in your application. Working set is the amount of active physical RAM being used by the application and can include things like file buffers, shared libraries and other things that you might not consider to be a part of your applications 'true' memory usage. It can also go down when your application is paging (which means that as memory usage goes up, the task manager reading can actively go down!)

ANTS uses about 20Mb of memory for the purposes of tracking how objects move between snapshots, plus an unbounded amount of memory that is proportional to the number of objects that are disposed but still in memory. Most of ANTS memory usage is actually in shared memory, so shouldn't show up in private bytes. This probably explains the difference that you're seeing. A certain amount of ANTS own memory usage winds up in the 'unmanaged memory' section of the results as well, though the shared memory does not.

'Total memory usage' is a somewhat nebulous concept in Windows: private bytes are the closest approximation to what most people would consider to be the memory usage of an application (that's the amount of memory allocated exclusively by that application). However, 'out of memory' conditions aren't actually triggered by the amount of used memory, but the amount of used address space, and Windows doesn't really have a good measurement of this - virtual bytes is the closest measurement, but note that it will appear really high, especially on 64-bit systems as .NET will reserve large regions of memory for itself without actually allocating anything.
Andrew Hunter
Software Developer
Red Gate Software Ltd.
AndrewH
 
Posts: 134
Joined: Thu Aug 17, 2006 3:44 pm


Return to ANTS Memory Profiler 7

Who is online

Users browsing this forum: No registered users and 0 guests