httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Fritsch ...@sfritsch.de>
Subject Re: Memory usage, core output filter, and apr_brigade_destroy
Date Tue, 22 Sep 2009 19:19:20 GMT
On Sunday 13 September 2009, Stefan Fritsch wrote:
> On Sunday 13 September 2009, Ruediger Pluem wrote:
> > On 09/13/2009 01:11 PM, Stefan Fritsch wrote:
> > > http://httpd.apache.org/docs/trunk/developer/output-filters.htm
> > >l recommends to reuse bucket brigades and to not use
> > > apr_brigade_destroy. However, both in 2.2 and in trunk, the
> > > core output filter sometimes calls apr_brigade_destroy on
> > > brigades that it has received down the chain from earlier
> > > output filters. Is this not bound to cause problems since the
> > > brigade's pool cleanup is then removed but the brigade is still
> > > reused later on?
> >
> > It could be. But the questions is if it is really reused later
> > on.
> 
> Since this is the recommended design for output filters, I am sure
>  it can happen.

I have attached two patches:

In the first, I change (hopefully) all places to not 
apr_brigade_destroy brigades that have been passed down the filter 
chain. Especially the core_output_filter change needs some review.

In the second, I have changed all occurences of apr_brigade_split to 
apr_brigade_split_ex and I have made some more changes where bucket 
brigades can be reused.

The test suite shows no regressions.

Cheers,
Stefan

Mime
View raw message