Windbg uses a different heap information lookup mechanism depending on which flag you use.
The -p flag tells you that you turned on the Page gflags.exe through gflags.exe or the like. When Heap of Pages is turned on, Windows maintains a separate set of structures ( _DPH_HEAP_ROOT and co) for tracking distributions. If PageHeap is not enabled, there will be no such structures, so you will not get an exit. I also expect -p -a to just look back from the address to try and find _DPH_HEAP_BLOCK , which describes the distribution.
The -x flag tells Windbg to work with the _HEAP / _HEAP_ENTRY structures that Windows uses to track distributions. This set of structures describes all active distributions that have passed through standard distributors (for example, malloc , new , LocalAlloc, HeapAlloc`, etc.).
There are some great articles on the internal components of Windows heap allocators. I really like the article Chris Valasek ( @nudehaberdasher ) did a few years ago on the Low Fragmentation Heap heap that was implemented on Windows 7 (and the principles still apply in Win8).
source share