!dumpheap -min for strings does not work as expected

34 Views Asked by At

It seems like !DumpHeap does not handle string types correctly when given the size parameter.

Please, observe:

0:000> !DumpMT 00007fff6c9c16b8
EEClass:         00007fff6c3447a8
Module:          00007fff6c341000
Name:            System.String
mdToken:         0000000002000068
File:            C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll
BaseSize:        0x18
ComponentSize:   0x2
Slots in VTable: 193
Number of IFaces in IFaceMap: 7
0:000> !dumpheap -min 100000 -mt 00007fff6c9c16b8 -stat
Statistics:
              MT    Count    TotalSize Class Name
Total 0 objects
0:000> !strings /n:100000
Address            Gen    Length   Value
---------------------------------------
0000009767ed96c8   LOH    106134   
                SET DEADLOCK_PRIORITY HIGH

                DECLARE @CommittedCommitStateId INT = (Select PR...
0000009767f223e0   LOH    105665   
                SET DEADLOCK_PRIORITY HIGH

                DECLARE @CommittedCommitStateId INT = (Select PR...
0000009767fa26f0   LOH    107518   
                SET DEADLOCK_PRIORITY HIGH

                DECLARE @CommittedCommitStateId INT = (Select PR...
0000009767fd6f28   LOH    107049   
                SET DEADLOCK_PRIORITY HIGH

                DECLARE @CommittedCommitStateId INT = (Select PR...
---------------------------------------
4 matching strings
0:000>

SOS !DumpHeap -min 100000 produced no results whereas !strings /n:100000 produced some.

Could it be that !DumpHeap -min just does not handle strings correctly? Or I am missing something?

0

There are 0 best solutions below