apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <mt...@apache.org>
Subject Re: On to APR 2.0.0? Beyond 9x/ME
Date Mon, 16 Feb 2009 07:06:11 GMT
Branko ─îibej wrote:
> Graham Leggett wrote:
> I expect that with the new detached global pools in APR, that particular
> problem would never have arisen.

Right, that was the point, and that allows the pools
to behave more or less like malloc/free.

One thing I've proposed (but was vetoed) was the actual
malloc/free programmable replacement within the allocator.
Now the thing to consider is to make the allocator public
allowing to implement what ever system memory allocation
there is (eg, heap or virtualmemory on win32, shm, etc)
instead just relying on standard allocator implementation
which (I presume that 8K granulation was more or less
empirically determined) is fixed.

> The fact remains that control of pool lifetimes, whether in combination
> with DSO or long-lived memory structures, is a tricky problem not
> addressed by the current implementation.

Detached pools behave like malloc/free and have to be
destroyed manually (well you can always create a pool
cleanup from some standard pool).
Having custom allocators one could even create
smaller (less then default 8K) memory
footprint where system malloc has low fragmentation and
larger number of small pools is required.


View raw message