Options

Memory Profiling

While the performance profiler seems to work fine the memory profiler doesn't do some things that I was expecting (or perhaps just hoping for) in relation to determining information about our web application and may have some errors.

We have asp.net web applications hosted in IIS 5 and using c# (.net 1.1) for the code behinds.

First, I've been unable to find any means of determining the actual memory footprint for specific new classes / objects that have been created and put into use.

For example while looking at the memory for one of the new classes (it's actually a several classes that are referenced in layers inside a top level class) the size it listed as 32 bytes. That may well be accurate for the top level class itself, however, what I was hoping to find was the total memory footprint for the master class and all of the other new classes it references. That total ought to be in excess of 50 Kb instead of 32 bytes.


A couple of potential problems:

1. When on the "All Objects" tab and viewing a row which has a source file listed the "source code" tab frequently (if not always) appears to show source that isn't related to the object in question.

2. When an object is instantiated the objects the instantiated class contains (even if they're system objects like strings) frequently get listed as being in the source file where the parent class is instantiated rather than being listed as being in the source file of that parent class.

The source file of the parent class isn't even actually shown as being part of the application while doing memory profiling. It does appear as part of the application when doing performance profiling.


Those potential problems don't really have a significant impact on me, I'd really just like to have a way to get the total memory footprent of various objects without having to manually track down every string, int, child object, etc that is part of the parent object and calculate the size of the parent object from all of those individual child objects.

Comments

  • Options
    Essentially I'm looking for the ability that was requested in this Ants 2 thread from last June where the response at that time was only done for objects on the summary tab not for objects in the main grid because of the amount of time it would take.

    http://www.red-gate.com/MessageBoard/vi ... php?t=2670

    If this is still the case for Ant 3 does the profiler have enough information that it could calculate size with children if requested when highlighting an object in the main grid?
  • Options
    Hi,
    I am having quite a confusing time trying to decipher the memory profiling of my ASP.NET application. I'm trying to trace a memory leak (well actually, inefficient GC collections) but the results from ANTS are not too helpful. Most memory-hogging objects have the phrase: 'there is no source code available for the allocation of this object'. While a few of my objects that do have do have source code are not taking up very much memory.

    I'm expecting that ANTS would point to my code in a heirarchal fashion (just like ANTS performance profiler), and ignore objects that I don't have source code for (like internal IIS objects).

    Am I using memory profiler incorrectly, or expecting too much of it?

    Is there a tutorial on how to memory profile an ASP.NET application, as the tutorial that I can find is for a windows forms application.

    Lance
Sign In or Register to comment.