Ich versuche herauszufinden, warum einige Objekte in meiner Anwendung angeheftet sind. Die Objekte, die ich mir bisher angesehen habe, sind Objektarrays. !gcroot zeigt das Array als angeheftet an, aber ich weiß nicht, wie ich herausfinden kann, warum es angeheftet ist.
Ausgabe:
0:000> !dumpobj 0239cea0
Name: System.Object[]
MethodTable: 793041d0
EEClass: 790eda54
Size: 528(0x210) bytes
Array: Rank 1, Number of elements 128, Type CLASS
Element Type: System.Object
Fields:
None
0:000> !gcroot 0239cea0
Hinweis: Auf den Stacks gefundene Roots können falsch positiv sein. Führen Sie "!help gcroot" aus, um weitere Informationen zu erhalten.
Scan Thread 0 OSTHread f3c
Scan Thread 2 OSTHread e54
Scan Thread 4 OSTHread 748
Scan Thread 5 OSTHread fe0
Scan Thread 7 OSTHread 7a0
Scan Thread 9 OSTHread cf4
Scan Thread 10 OSTHread a6c
Scan Thread 11 OSTHread bc4
Scan Thread 12 OSTHread 598
Scan Thread 13 OSTHread a8
Scan Thread 14 OSTHread 50c
Scan Thread 15 OSTHread ba4
Scan Thread 16 OSTHread b40
Scan Thread 17 OSTHread 534
Scan Thread 18 OSTHread 5fc
Scan Thread 19 OSTHread dfc
Scan Thread 20 OSTHread cc4
Scan Thread 21 OSTHread f84
Scan Thread 22 OSTHread 9f4
Scan Thread 23 OSTHread ff0
Scan Thread 24 OSTHread fb0
Scan Thread 25 OSTHread c14
Scan Thread 29 OSTHread 5c4
DOMAIN(0015EB90):HANDLE(Pinned):971e74:Root:0239cea0(System.Object[])
DOMAIN(0015EB90):HANDLE(WeakSh):971e74:Root:0239cea0(System.Object[])
DOMAIN(0015EB90):HANDLE(WeakSh):971e74:Root:0239cea0(System.Object[])
DOMAIN(0015EB90):HANDLE(WeakSh):971e74:Root:0239cea0(System.Object[])
DOMAIN(0015EB90):HANDLE(Unknwn):971e74:Root:0239cea0(System.Object[])
DOMAIN(0015EB90):HANDLE(WeakSh):971e74:Root:0239cea0(System.Object[])
DOMAIN(0015EB90):HANDLE(Unknwn):971e74:Root:0239cea0(System.Object[])
DOMAIN(0015EB90):HANDLE(WeakSh):971e74:Root:0239cea0(System.Object[])
DOMAIN(0015EB90):HANDLE(WeakSh):971e74:Root:0239cea0(System.Object[])
DOMAIN(0015EB90):HANDLE(Unknwn):971e74:Root:0239cea0(System.Object[])
DOMAIN(0015EB90):HANDLE(Unknwn):971e74:Root:0239cea0(System.Object[])
DOMAIN(0015EB90):HANDLE(WeakSh):971e74:Root:0239cea0(System.Object[])
DOMAIN(0015EB90):HANDLE(Unknwn):971e74:Root:0239cea0(System.Object[])
DOMAIN(0015EB90):HANDLE(Unknwn):971e74:Root:0239cea0(System.Object[])
DOMAIN(0015EB90):HANDLE(Unknwn):971e74:Root:0239cea0(System.Object[])
DOMAIN(0015EB90):HANDLE(Unknwn):971e74:Root:0239cea0(System.Object[])
DOMAIN(0015EB90):HANDLE(Unknwn):971e74:Root:0239cea0(System.Object[])
DOMAIN(0015EB90):HANDLE(Unknwn):971e74:Root:0239cea0(System.Object[])
DOMAIN(0015EB90):HANDLE(Unknwn):971e74:Root:0239cea0(System.Object[])
DOMAIN(0015EB90):HANDLE(Unknwn):971e74:Root:0239cea0(System.Object[])
DOMAIN(0015EB90):HANDLE(Unknwn):971e74:Root:0239cea0(System.Object[])
DOMAIN(0015EB90):HANDLE(Unknwn):971e74:Root:0239cea0(System.Object[])
DOMAIN(0015EB90):HANDLE(Unknwn):971e74:Root:0239cea0(System.Object[])
DOMAIN(0015EB90):HANDLE(Unknwn):971e74:Root:0239cea0(System.Object[])
DOMAIN(0015EB90):HANDLE(Unknwn):971e74:Root:0239cea0(System.Object[])
DOMAIN(0015EB90):HANDLE(Unknwn):971e74:Root:0239cea0(System.Object[])
Bearbeitet: !eeheap -gc Ausgabe hinzugefügt
!eeheap -gc
Anzahl der GC-Heaps: 1
Generation 0 beginnt bei 0x49a6f940
Generation 1 beginnt bei 0x49a0c8a8
Generation 2 beginnt bei 0x01301000
Ephemerer Segment-Zuweisungskontext: keiner
Segment begin allocated size
01300000 01301000 022f05a0 0x00fef5a0(16709024)
0d0d0000 0d0d1000 0e0bb0cc 0x00fea0cc(16687308)
0e9e0000 0e9e1000 0f9de3e8 0x00ffd3e8(16765928)
11020000 11021000 12014808 0x00ff3808(16726024)
15020000 15021000 15ff3958 0x00fd2958(16591192)
139f0000 139f1000 1499f584 0x00fae584(16442756)
16020000 16021000 16fd7c30 0x00fb6c30(16477232)
19020000 19021000 1a013df4 0x00ff2df4(16723444)
17020000 17021000 17fcfe8c 0x00faee8c(16445068)
18020000 18021000 18fedb84 0x00fccb84(16567172)
1a020000 1a021000 1afc8814 0x00fa7814(16414740)
26010000 26011000 26f97d2c 0x00f86d2c(16280876)
2d010000 2d011000 2df97210 0x00f86210(16278032)
20010000 20011000 210028e0 0x00ff18e0(16718048)
21010000 21011000 220085d8 0x00ff75d8(16741848)
23810000 23811000 247acf60 0x00f9bf60(16367456)
28010000 28011000 28f84f80 0x00f73f80(16203648)
1c010000 1c011000 1cfba544 0x00fa9544(16422212)
1d010000 1d011000 1dfdcf64 0x00fcbf64(16564068)
32010000 32011000 32f9189c 0x00f8089c(16255132)
1e010000 1e011000 1eff9824 0x00fe8824(16680996)
2c010000 2c011000 2cfd4904 0x00fc3904(16529668)
300a0000 300a1000 3104a488 0x00fa9488(16422024)
24810000 24811000 2571bd20 0x00f0ad20(15772960)
36d10000 36d11000 37c982d4 0x00f872d4(16282324)
29010000 29011000 29fc96a0 0x00fb86a0(16484000)
27010000 27011000 27ee38bc 0x00ed28bc(15542460)
2a010000 2a011000 2afab094 0x00f9a094(16359572)
441c0000 441c1000 45149df0 0x00f88df0(16289264)
38d10000 38d11000 39ce4254 0x00fd3254(16593492)
3bd10000 3bd11000 3cc7a750 0x00f69750(16160592)
3ad10000 3ad11000 3bc8b878 0x00f7a878(16230520)
411c0000 411c1000 421655a0 0x00fa45a0(16401824)
2b010000 2b011000 2bfafae4 0x00f9eae4(16378596)
461c0000 461c1000 471a1bb0 0x00fe0bb0(16649136)
3e1c0000 3e1c1000 3f11151c 0x00f5051c(16057628)
34010000 34011000 35003ae4 0x00ff2ae4(16722660)
451c0000 451c1000 4609e680 0x00edd680(15586944)
4c1c0000 4c1c1000 4d105324 0x00f44324(16007972)
2f0a0000 2f0a1000 3007989c 0x00fd889c(16615580)
50e10000 50e11000 51cf17d8 0x00ee07d8(15599576)
33010000 33011000 34005d88 0x00ff4d88(16731528)
37d10000 37d11000 38cc6d7c 0x00fb5d7c(16473468)
481c0000 481c1000 4898a468 0x007c9468(8164456)
39d10000 39d11000 3acbe2d8 0x00fad2d8(16437976)
3f1c0000 3f1c1000 3fd1f378 0x00b5e378(11920248)
51e10000 51e11000 52e01018 0x00ff0018(16711704)
431c0000 431c1000 441805d8 0x00fbf5d8(16512472)
401c0000 401c1000 4116b2b0 0x00faa2b0(16425648)
421c0000 421c1000 430da254 0x00f19254(15831636)
491c0000 491c1000 49b98e0c 0x009d7e0c(10321420)
Large object heap starts at 0x02301000
segment begin allocated size
02300000 02301000 02f1bf20 0x00c1af20(12693280)
Total Size 0x31786160(829972832)
------------------------------
GC Heap Size 0x31786160(829972832)