apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sander Striker" <stri...@apache.org>
Subject RE: Pools debug
Date Sat, 12 Jan 2002 15:13:33 GMT

I have two debug modes for pools in mind:

  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

  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.


  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,


View raw message