Don't apply this one yet, just found a problem with it.
On Tue, Nov 24, 2009 at 6:20 PM, Dan Kegel dank@kegel.com wrote:
This adds something like support for
HEAP_DISABLE_COALESCE_ON_FREE.
If the GlobalFlags registry entry has the
200000 bit set, freed blocks are set
aside for a while rather than immediately
being released for reuse. This allows
us to poison them and check for use-after-free
or double-free errors, and report them as heap corruption.
If you're running Valgrind, you get an immediate error
and stack trace for any of these heap corruption events,
which was the motivation for the patch series.
But the patches are useful even without valgrind.
The number of blocks kept out of circulation is
5000 by default, but can be set via an environment
variable. It ought to have a limit on number of bytes,
too, but this seemed enough for the moment.