Debugging unmanaged memory usage in .net app

Posted on 2008-11-14
Last Modified: 2012-05-05
Hi Experts - I have a leak in unmanaged memory (private bytes continue to go up over time while .net # bytes in all heaps is very low and constant).  I can cause the private bytes to rise by calling a method which itself calls many different methods.  I can't find a good approach to debug this.  It seems like I would simply need to inspect the memory beforehand and then after and see what the difference is and what component is causing the difference.

I've tried windbg and debugdiag but can't get them to do what i want.  Please help!
Question by:sfun28
    LVL 10

    Accepted Solution

    Hi sfun28.

    I'm not sure exactly what to suggest, but you might want to check out the following blog entries:

    The author of the above blog is an ASP.NET escalation engineer and is a VERY knowledgable induvidual. You can learn a lot from this person's site. Hopefully there is enough information on this site, and these blog entries, to help you debug your issue.

    Hope this helps.
    LVL 1

    Author Comment

    the first link is the best resource i've seen so far, but that said it covers a very narrow scoped case.  I've spent hours researching this and i have yet to find a good article on this topic.

    closing out this thread.
    LVL 1

    Author Closing Comment

    Thanks for helping.  per my comment, there doesn't seem to be a great resource for this

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (…
    This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now