Juvy

I Believe Persistence.

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
 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
  

posted on 2012-07-27 19:14  Juvy  阅读(359)  评论(0编辑  收藏  举报
QQ:1054930154; Email:david.telvent@gmail.com; QQ群:67511751