views:

495

answers:

1

I think I'm missing some fundamentals here so hopefully this post can clarify this.

I've taken a dump and am looking at the managed heap and am interested in looking specifically at what objects are within each heap. Here is the output from the debugger:

0:000> !eeheap -gc
Number of GC Heaps: 1
generation 0 starts at 0x3cca447c
generation 1 starts at 0x3cc9d8a0
generation 2 starts at 0x01651000
ephemeral segment allocation context: none
 segment    begin allocated     size
01650000 01651000  0264fcc8 0x00ffecc8(16772296)
139a0000 139a1000  1499e5b0 0x00ffd5b0(16766384)
18ca0000 18ca1000  19c98a58 0x00ff7a58(16743000)
25ad0000 25ad1000  26acd454 0x00ffc454(16761940)
23ad0000 23ad1000  24acd2a0 0x00ffc2a0(16761504)
27ad0000 27ad1000  28acc724 0x00ffb724(16758564)
29ad0000 29ad1000  2aacf1e8 0x00ffe1e8(16769512)
1dca0000 1dca1000  1ec9ff50 0x00ffef50(16772944)
26ad0000 26ad1000  27acf8f8 0x00ffe8f8(16771320)
1bca0000 1bca1000  1cc9f680 0x00ffe680(16770688)
30790000 30791000  3178fe0c 0x00ffee0c(16772620)
2f790000 2f791000  3078ff74 0x00ffef74(16772980)
31790000 31791000  3278eef4 0x00ffdef4(16768756)
24ad0000 24ad1000  25acf6b4 0x00ffe6b4(16770740)
1cca0000 1cca1000  1dc78438 0x00fd7438(16610360)
2bad0000 2bad1000  2cace4fc 0x00ffd4fc(16766204)
28ad0000 28ad1000  29aca8d8 0x00ff98d8(16750808)
34790000 34791000  3578aa1c 0x00ff9a1c(16751132)
2aad0000 2aad1000  2baaa004 0x00fd9004(16617476)
32790000 32791000  337385fc 0x00fa75fc(16414204)
35790000 35791000  36779394 0x00fe8394(16679828)
149a0000 149a1000  1599f9f0 0x00ffe9f0(16771568)
42550000 42551000  435493e8 0x00ff83e8(16745448)
3f370000 3f371000  4036e108 0x00ffd108(16765192)
33790000 33791000  346e6328 0x00f55328(16077608)
43550000 43551000  4452fcf8 0x00fdecf8(16641272)
3b5d0000 3b5d1000  3c3b78e4 0x00de68e4(14575844)
3c5d0000 3c5d1000  3ce92284 0x008c1284(9179780)
Large object heap starts at 0x02651000
 segment    begin allocated     size
02650000 02651000  033a4440 0x00d53440(13972544)
11040000 11041000  11b4c5b0 0x00b0b5b0(11580848)
12040000 12041000  12701580 0x006c0580(7079296)
1eca0000 1eca1000  1fb613e0 0x00ec03e0(15467488)
19ca0000 19ca1000  19eb0528 0x0020f528(2159912)
1aca0000 1aca1000  1b0e3840 0x00442840(4466752)
202d0000 202d1000  2335be68 0x0308ae68(50900584)
Total Size  0x21997e04(563707396)
------------------------------
GC Heap Size  0x21997e04(563707396)

I expect that I can take the start address of the GC generations and then look at the segments that start from that address all the way up to the next generation. I believe the heap is compacted thus expect to find generation 2 at the first segment, and this looks to be the case:

01650000 01651000  0264fcc8 0x00ffecc8(16772296)

However I'm not able to determine where this ends as I can't find where generation 1 starts at 0x3cc9d8a0.

I think there are some fundamentals of the above addressing that I'm missing here.

Any suggestions?

+1  A: 

You can use the SOSEX extensions to examine each generations heap individually and also look at the roots of each object on each heap.

Colin Desmond
Hi Colin. The command !eeheap -gc run above is from the SOS extension, I believe this is the command to look at each generation heap individually. Just having a bit of trouble with it.
Keith
You can use the dumpgen command in sosex to dump the contents of a particular generation if that helps.
Colin Desmond
If you haven't seen it, this page is also worth a read. http://msdn.microsoft.com/en-gb/magazine/cc164138.aspx
Colin Desmond
ohhhhh sosex is not just your abbreviation for SOS extension, its actually written by Steve Johnson (http://www.stevestechspot.com/SOSEXV2NowAvailable.aspx), cool will check it out, thanks. Thanks for the link, I seem to read that article each time I return to memory issues :)
Keith