]> git.ipfire.org Git - thirdparty/haproxy.git/commit
DEBUG/MEDIUM: memory: optionally protect free data in pools
authorWilly Tarreau <w@1wt.eu>
Wed, 28 Oct 2015 14:09:29 +0000 (15:09 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 28 Oct 2015 14:27:59 +0000 (15:27 +0100)
commitac421118db064273a71d5f94929c984a96425a54
treeda8ca14f30272db267cff610f756ffa082a95efe
parenta84dcb8440cdfc4082e0d1396fb578591c2a85a3
DEBUG/MEDIUM: memory: optionally protect free data in pools

When debugging a core file, it's sometimes convenient to be able to
visit the released entries in the pools (typically last released
session). Unfortunately the first bytes of these entries are destroyed
by the link elements of the pool. And of course, most structures have
their most accessed elements at the beginning of the structure (typically
flags). Let's add a build-time option DEBUG_MEMORY_POOLS which allocates
an extra pointer in each pool to put the link at the end of each pool
item instead of the beginning.
include/common/memory.h
src/memory.c