Is my heap fragmented

谁说胖子不能爱 提交于 2019-12-05 04:01:48

So...we know we have a fragmented heap. The next question is: what's causing the fragmentation? What's keeping these free objects from being released? The recommendations I have read is to examine the objects right after the free space:

  1. !dumpheap -stat

  2. Dump the method table of the Free object: !dumpheap -mt 000db8e8

  3. Select one Free object from the list to examine more closely: !dumpobj 0x2003b0b0

  4. Record the object's size

  5. Dump the next object after it: !dumpobj 0x2003b0b0+1000

  6. Find the object holding a reference !gcroot 0x2003b0b0+1000

  7. Dump the gchandle of the object found.

I usually get down this rabbit hole, and my limited knowledge of the .NET API fails here. Is this the correct way to debug the problem?

Jeff

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!