The Heap Manager keeps internally single-linked lists, double-linked lists
and implicit lists of blocks.
The 100% CPU can occur if you've made one of the double-linekd list
and you've fallen in the code path that searches the so called non-dedicated
list in the Alloc code path.
The standard way to attack a heap corruption is to
enable Full-PageHeap for your application,
and run your application under a de *** .
Download the systm de *** s from
Assuming they are installed in c:\de *** s, run gflags.exe to enable full
PageHeap for your application
c:\de *** s>gflags -i YourApp.exe +hpa
then run your usage scenario under de ***
(I would recomend using the cdb/ntsd/windbg de *** s,
since they provide de *** extensions to understand the heap structures).
PageHeap can expose a variety of problems:
for heap overrun, it will force an Access Violation on the spot.
for double delete, it will print a message in the de *** .
for reuse after delete, it will force an Access Violation on the spot.
for other problems it may not break on the spot,
but when the daly-free-queue is validated.
If you cannot make sense of the break, please
set up a system de *** with good symbols,
and report the output of the '~*kb' command to the newsgroup.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at