httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manoj Kasichainula <man...@io.com>
Subject Re: memory allocation (was Re: Why bother with APR?)
Date Tue, 21 Sep 1999 05:38:40 GMT
On Tue, Sep 14, 1999 at 09:43:27AM -0700, Dean Gaudet wrote:
> note:  when i was suggesting adding cleanups for malloc'd memory i really
> wasn't suggesting that a cleanup be added for each piece of malloc'd
> memory.  that will consume a fair bit more memory per allocation... i was
> actually thinking the solution would be to prefix the malloc allocation
> with a struct mem { mem *next; mem *prev }; ... and having a single
> cleanup which walks the entire list of malloc allocations.

Sounds like a pool to me. :) What's the advantage of this? If the list
is short, we're reverting closer to the one-malloc-per-cleanup case.
If the list is long, pools start looking really good. Or am I missing
something?

-- 
Manoj Kasichainula - manojk at io dot com - http://www.io.com/~manojk/

Mime
View raw message