apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sander Striker" <stri...@apache.org>
Subject RE: APR pool maintains too much free list
Date Mon, 28 Jan 2002 16:50:33 GMT
> >There is that, although I must admit that I have a 'hi free'
> >patch lying around.  The idea is to free() all mem on the freelist
> >when the freelist size goes over a certain threshold (like a few
> >MB).  I would need some feedback on this though,
> >
> The high free threshold would be useful in at least one
> place that I can think of in Apache.  If we change the
> worker MPM so that each worker threads can own a persistent
> pool (and clear it, rather than destroying it, after each
> request), then it would be good to have a mechanism that
> sets the max size of a pool's free list following
> apr_pool_clear().  E.g., I'd want to configure each ptrans
> pool to keep three 8KB blocks in its allocator, for a total
> of 24KB, in order to avoid mallocs on the next request most
> of the time; but if the last request allocated 10MB within
> the pool, we should return most of that space to the system
> heap.
> But IMHO the only time when we should apply the high free
> threshold is when destroying or clearing a pool.

And that is how it works.
> --Brian


View raw message