UI版本WinDBG常用命令

 1、查看对象内存占用信息

1.1、查看所有对象内存占用信息,包括:内存地址,对象个数,字节大小,对象类型 

!dumpheap -stat

1.2、类型过滤 

//所有Dictionary类型对象

!dumpheap -type System.Collections.Generic.Dictionary`2+Entry[[System.Int32, mscorlib]

1.3、命名空间过滤 

//所有System命名空间的对象

!dumpheap -type System

1.4、对象所占用内存空间大小过滤 

//查看指定类型,字节大小>=1000的对象的内存占用信息
!dumpheap -type System.Collections.Generic.Dictionary -min 1000
2.查看指定内存地址的对象信息
!heap -stat -h 05a9078c

3、查看对象引用根位置

  !gcroot 059c9820
  

原文地址:https://www.cnblogs.com/Juvy/p/2612352.html