Using Full Page Heap to Find Heap Corruption

 

Compile the application in release mode, and run it under debugger after having enabled full page heap.

c:\debuggers>gflags -p /enable InDevelopmentApp.exe /full

c:\debuggers>start cdb -g -G InDevelopmentApp.exe

The heap instrumentation activated by gflags.exe is likely to put you very close to the place where the corruption has happened.