httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@covalent.net
Subject Re: memory leak
Date Tue, 06 Feb 2001 23:16:53 GMT

> > Nobody ever said it was a bad design, in fact, Paul Reder said he was
> > working on it.  However, that design absolutely invalidates the idea of
> > using a pool to allocate the buckets, which is the design being discussed
> > here.
> 
> Um, why?  A lookaside list for buckets allocated from a pool seems like
> a perfect match to me.  Some buckets cannot come from pools, and so
> use malloc()/free().  Others can be, and we use lookaside lists there
> to avoid leakage and gain pool semantics and protection.  If we leak
> memory when the pool is destroyed, then it is a bug -- something out
> of scope was allocated from the pool.
> 
> I do not see that is has to be all one or all the other.

Buckets refer to data, and the data can come from any source it's wants
to, including pools.  The question here is where do the buckets themselves
get allocated from.  Buckets can not be allocated out of a pool, and still
survive for the correct lifetime, because we don't know what the lifetime
will be when the bucket is created.

I guess I don't see which buckets can safely be allocated from
pools.  Perhaps if you could explain that to me, we could figure this out
together.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------





Mime
View raw message