views:

194

answers:

2

I created a high memory utilization dump and using !dumpheap -stat and !dumpheap -mt I got the address of two large string generic list of 30 MB each.

I want to know more about these lists. What they contain or which piece of code is using them.

Is there a way to find them out?

0:000> !do 2b370038 Name: System.Object[] MethodTable: 71e240bc EEClass: 71c0da54 Size: 33554448(0x2000010) bytes Array: Rank 1, Number of elements 8388608, Type CLASS Element Type: System.Collections.Generic.List`1[[System.String, mscorlib]] Fields: None

A: 

I recommend that you try .Net Memory Profiler (http://memprofiler.com) to explore managed memory dumps. It is so much easier than windbg. A nice GUI that you can use to search and explore graphs of references. You can also see instances' fields' values.

Sly
A: 

To get information about the array instances, you can use the !dumparray command with the -details flag. Be warned however that dumping an entire array may take a while and output a lot of text.

To find out what is keeping the instances alive use the !gcroot command. You may also want to check out the !refs command from sosex.dll.

sosex.dll also has a !gcgen command, which can tell you the generation of the instances. IIRC a corresponding command has been added to the CLR 4.0 version of sos.dll.

Brian Rasmussen