.load C:\Windows\Microsoft.NET\Framework\v2.0.50727\sos
.loadby sos clr
.load clr
!dumpheap –stat
!dumpheap -type System.Double[]
> !gcroot 31daa0d0
!heap –s
會獲得下列數據:html
Heap Flags Reserv Commit Virt Free List UCR Virt Lock Fast
(k) (k) (k) (k) length blocks cont. heap
00130000 08000002 97344 97296 97344 278 626 10 13 e c++
!heap –stat –h 00130000
size #blocks total ( %) (percent of total busy bytes)
800 2cce0 - 16670000 (75.42)
200 2cce1 - 599c200 (18.86)
98 2ccdf - 1a9a468 (5.60)c#
!heap -flt s 800
HEAP_ENTRY Size Prev Flags UserPtr UserSize - state
60b79f8 0103 0000 [00] 060b7a10 00800 - (busy)
mscoreei!_iob
060ba168 0103 0103 [00] 060ba180 00800 - (busy)spa
!heap -p -a 060b7a10
MyTestD!MyTest::Dosomething+0x000000c6
u MyTestD!MyTest::Dosomething+0x000000c6