httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <jwool...@virginia.edu>
Subject Re: Source of memory leak in mod_proxy?
Date Thu, 05 Sep 2002 02:11:13 GMT
On Wed, 4 Sep 2002, Greg Stein wrote:

>     bb = apr_brigade_create(r->pool, r->connection->bucket_alloc); Does
> that allocator somehow use connection memory? Maybe we have some kind of
> leak between the request-based brigade and the connection-based
> allocator? [ I don't know enough about the bucket allocator stuff ]

The purpose is supposed to be that, over the course of the connections for
which the allocator is used, you reach a steady state where n-bytes are
the most needed at one time.  Unlike the connection pool, the
c->bucket_alloc reuses memory as buckets get freed.

Bottom line: the size of c->bucket_alloc will be based on the max number
of buckets and bucket buffers you've had allocated at one time.  The
answer is almost certainly that apr_bucket_destroy() is not being called
on some bucket that you're actually finished with.  This could be a
symptom of discarding a brigade that still has buckets in it (since
apr_brigade_destroy() will destroy all the buckets that are in the brigade
at the time of the brigade's destruction), which is, I believe, what you
guys have said is happening in this case.

--Cliff


Mime
View raw message