using memory profiler for investigating native memory leak

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
Post Reply
SG
Posts: 9
Joined: Thu May 11, 2006 12:37 am

using memory profiler for investigating native memory leak

Post by SG » Thu Jun 01, 2006 5:40 am

Our ASP.Net 2.0 app. has a confirmed memory leak (We see the private bytes go up constantly in perf. mon). We also see that # Bytes in all heaps pretty much stays in a range, leading us to believe that native memory might be the source of the memory. We ran memory profiler during a stress run and took snapshopts over a period of several days. In all the snapshots I only see 0 in the Disposed Instances column (except for two classes - sqlconnection and sqlcommand - always see 1, which I am assuming is due to pooled connections)

Can Memory profiler (version 2.6) help in pinpointing the source of the memory leak? How can i effectively use this tool to investigate memory leaks related to native memory (as it appears in my case)?

Thanks!

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

Post by Andreas Suurkuusk » Thu Jun 01, 2006 6:38 pm

Hi,

Version 2.6 of .NET Memory Profiler provides limited support for investigating a native memory leak. If you have purchased a licence of the profiler, I recommend that you download the available preview of .NET Memory Profiler 3.0. This version allows you to track unmanaged resources, and might help you to locate your native memory leak.
Best regards,

Andreas Suurkuusk
SciTech Software AB

SG
Posts: 9
Joined: Thu May 11, 2006 12:37 am

Post by SG » Thu Jun 01, 2006 10:09 pm

Thanks!
Can the profiler (version 2.6) be used to investigate memory leaks caused by GC handles?

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

Post by Andreas Suurkuusk » Sun Jun 04, 2006 6:04 pm

Hi,

If you have GCHandles that are not correctly released, you will have instances that are not correctly GCed (unless the GCHandle is weak). The profiler will help you identify instances that are not GCed due to a unreleased GCHandle. However, the root of these instances will not be identified as a GCHandle, it will only be presented as <root>.
Best regards,

Andreas Suurkuusk
SciTech Software AB

Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests