Hello Tony, On Tue, Feb 7, 2017 at 10:38 PM, Antonio Mammita <ammamm...@gmail.com> wrote: > > I tried to use APR compiled with --enable-debug, --enable-pool-debug, > --enable-mantainer-mode but nothing has helped. > > I think that a memory pool allocator that would just use malloc() could help > a lot when coupled with valgrind so what i'm asking is > > Any hint to give me to improve the tools that i can use ? > Any hint to change the allocator or to enable other hidden options ?
Did you try "--enable-pool-debug=yes|verbose|verbose-alloc|lifetime|owner|all"? Or if you want finer grained combination/mask of those, maybe CPPFLAGS="-DAPR_POOL_DEBUG=0x...", with: #define APR_POOL_DEBUG_GENERAL 0x01 #define APR_POOL_DEBUG_VERBOSE 0x02 #define APR_POOL_DEBUG_LIFETIME 0x04 #define APR_POOL_DEBUG_OWNER 0x08 #define APR_POOL_DEBUG_VERBOSE_ALLOC 0x10 Any --enable-pool-debug or APR_POOL_DEBUG value makes APR use malloc() for each allocation, though obviously there will be no individual free() before the pool is destroyed. There is also --with-valgrind and --with-efence available if you have them installed. Finally, with trunk/1.6.x (not 1.5.x), --enable-pool-concurrency-check may be helpful too. Regards, Yann.