Hi,
I have two debug modes for pools in mind:
APR_POOL_DEBUG and APR_POOL_DEBUG_VERBOSE.
APR_POOL_DEBUG:
1. Every allocation is done using malloc(). When
a pool is cleared all memory is free()d. This
makes this mode very good for use with 3rd party
tools like electric fence and purify.
NB. Justin has a patch to add --with-efence to
configure.
2. Each operation on a pool will make sure the
pool is still 'valid'. If it was previously
destroyed, abort() will be called.
3. To use this form of pools debug, you only _need_
to recompile apr_pools.c with APR_POOL_DEBUG
defined. However, if you want apr_pool_lock and
apr_pool_join to work (both are noops right now
btw), you do need to recompile your application.
APR_POOL_DEBUG_VERBOSE:
1. See 1 and 2 of APR_POOL_DEBUG
2. Generate output on stderr, showing where
a pool was created, cleared or destroyed.
3. To use this form of pools debug, you are advised
to rebuild the entire application, because
otherwise you won't have information on where
something happens. Instead, you get
<undefined>:0 as the location.
Hopefully I can commit this within the next two hours,
otherwise it will have to wait til tomorrow,
Sander