apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <mt...@apache.org>
Subject Re: apr pools & memory leaks
Date Thu, 02 Oct 2008 07:44:33 GMT
Ben Collins-Sussman wrote:
 > Our solution:
 > Over at Google, we simply hacked APR to *never* hold on to blocks for
 > recycling.  Essentially, this makes apr_pool_destroy() always free()
 > the block, and makes apr_pool_create() always call malloc() malloc.
 > Poof, all the memory leak went away instantly.

Why not creating allocator for each of those subpools.
On pool_destroy it'll destroy allocator and call free()
consuming the global pool only for allocating subpools
which are constant in size, thus no fragmentation can


View raw message