Memory allocated differs between Task Manager and Profiler

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
Post Reply
brettg
Posts: 1
Joined: Wed Sep 07, 2005 3:26 am

Memory allocated differs between Task Manager and Profiler

Post by brettg » Wed Sep 07, 2005 3:46 am

There are two parts to this query.
For our server Task Manager says there is 560 Mb allocated to aspnet_wp.exe whereas Memory profiler indicates 10.5 Mb.
Another post response indicated that the difference is unmanaged memory objects. But our difference is huge and we do not use any unusual objects e.g. special graphics or the like, we do use HTML image tags numerously. We also allow users to open attachments (e.g. word documents) and have tutorials in Flash.
We have a memory leak problem that becomes apparent occasionally.
So far, after comparing two low activity periods (24hrs apart), we found all instances of app objects were removed (including suspect ones). Hence we have concluded that it is the unmanaged memory that is leaking. Is this an accurate conclusion? What would those objects be in our case do you think?
This would be a little hard for anyone to answer without taking a detailed look at the data we have captured. So:Any idea where we could focus our efforts (keeping in mind that this is a ASP.NET web application with NET Framework 1.1, with service pack 1)?
Thanks in advance
Brett G

Andreas Suurkuusk
Posts: 1029
Joined: Wed Mar 02, 2005 7:53 pm

Post by Andreas Suurkuusk » Wed Sep 07, 2005 9:10 pm

It seems like you're working with external COM objects that can be very memory consuming (Flash, Word etc.). If these objects are not correctly released, then you will probably have a large unmanaged memory leak. The managed memory usage of a COM object (System.__ComObject) will be very small, so you will see a very big difference in the managed and the unmanaged memory usage.

I suggest that you use the profiler to see if you have System.__ComObjects that have not been correctly garbage collected, and I also suggest that you call Marshal.ReleaseComObject as soon as you have finished working with a COM object.
Best regards,

Andreas Suurkuusk
SciTech Software AB

Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests