<p>I would like to use something like CLR Profiles on .Net 2.0 to see what objects are taking more space in the heap at any given time (of an ASP.Net worker process).</p>

<p>However, the CLR Profiler only lets me START an app, not attach to an existing one. I assume this is because it tracks allocations and GC too, but i'm not very interested in that. I would just like something that takes a snapshot of the current state of the heap, and shows me what is there and how many objects of each kind there are, and how many bytes total are being used by each object type.</p>

<p>Any ideas?</p>

[{'answer_id': 33775, 'author': 'jfs', 'author_id': 718, 'author_profile': 'https://Stackoverflow.com/users/718', 'pm_score': 3, 'selected': True, 'text': '<p><a href="http://memprofiler.com/" rel="nofollow noreferrer">.Net Memory Profiler</a> is exactly what you need. It\'s not free but there\'s a trial version. Actually I used the trial to find leaks on our last project. One notable feature is:</p>\n\n<blockquote>\n  <p>Easily identify memory leaks by\n  collecting and comparing snapshots of\n  .NET memory</p>\n</blockquote>\n\n<p>I think this is what your looking for.</p>\n'}, {'answer_id': 146154, 'author': 'Peli', 'author_id': 14403, 'author_profile': 'https://Stackoverflow.com/users/14403', 'pm_score': 3, 'selected': False, 'text': '<ul>\n<li>Attach a debugger </li>\n</ul>\n\n<p>cdb -p </p>\n\n<ul>\n<li>load .net debugger extensions</li>\n</ul>\n\n<p>.loadby sos mscorwks</p>\n\n<ul>\n<li>dump the heap in a format the CLRProfiler understands</li>\n</ul>\n\n<p>!TraverseHeap heap.txt</p>\n\n<ul>\n<li>detach debugger</li>\n</ul>\n\n<p>qd</p>\n\n<ul>\n<li>load heap.txt in the clrprofiler app</li>\n</ul>\n'}]
['https://Stackoverflow.com/questions/33727', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3314/']