What do the different columns in the “!heap -flt -s xxxx” windbg command represent

前端 未结 3 1127
滥情空心
滥情空心 2020-12-31 02:05

I\'ve been doing some work on high memory issues, and I\'ve been doing a lot of heap analysis in windbg, and I was curious what the different columns really mean in \"!heap

3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-31 02:43

    From looking at the !heap documentation in the Debugging Tools for Windows help file and the heap docs on MSDN and a great excerpt from Advanced Windows Debugging, here's what I've been able to put together:

    • HEAP_ENTRY: pointer to entry within the heap. As you found, there is an 8 byte header which contains the data for the HEAP_ENTRY structure. The size of the HEAP_ENTRY structure is 8 bytes which defines the "heap granularity" size. This is used for determining the...
    • SIZE: size of the entry in terms of the granularity (i.e. the allocation size / 8)
    • FLAGS: these are defined in winbase.h with explanations found the in MSDN link.
    • USERPTR: the actual pointer to the allocated (or freed) object

提交回复
热议问题