Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Dev

Re: svn commit: r821471 - in /httpd/httpd/trunk: CHANGES modules/filters/mod_deflate.c modules/filters/mod_sed.c modules/http/chunk_filter.c server/protocol.c

 

 

Apache dev RSS feed   Index | Next | Previous | View Threaded


rpluem at apache

Oct 4, 2009, 1:28 AM

Post #1 of 2 (172 views)
Permalink
Re: svn commit: r821471 - in /httpd/httpd/trunk: CHANGES modules/filters/mod_deflate.c modules/filters/mod_sed.c modules/http/chunk_filter.c server/protocol.c

On 10/04/2009 09:37 AM, sf [at] apache wrote:
> Author: sf
> Date: Sun Oct 4 07:37:28 2009
> New Revision: 821471
>
> URL: http://svn.apache.org/viewvc?rev=821471&view=rev
> Log:
> core, mod_deflate, mod_sed: Reduce memory usage by reusing bucket
> brigades in several places
>
> Modified:
> httpd/httpd/trunk/CHANGES
> httpd/httpd/trunk/modules/filters/mod_deflate.c
> httpd/httpd/trunk/modules/filters/mod_sed.c
> httpd/httpd/trunk/modules/http/chunk_filter.c
> httpd/httpd/trunk/server/protocol.c
>


> Modified: httpd/httpd/trunk/server/protocol.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/protocol.c?rev=821471&r1=821470&r2=821471&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/server/protocol.c (original)
> +++ httpd/httpd/trunk/server/protocol.c Sun Oct 4 07:37:28 2009

> @@ -1300,16 +1302,15 @@
> * do a blocking read on the next batch.
> */
> if (e != APR_BRIGADE_FIRST(b)) {
> - apr_bucket_brigade *split = apr_brigade_split(b, e);
> + apr_brigade_split_ex(b, e, ctx->tmpbb);
> apr_bucket *flush = apr_bucket_flush_create(r->connection->bucket_alloc);
>
> APR_BRIGADE_INSERT_TAIL(b, flush);
> rv = ap_pass_brigade(f->next, b);
> if (rv != APR_SUCCESS || f->c->aborted) {
> - apr_brigade_destroy(split);
> return rv;
> }
> - b = split;


To be on the safe side we should do apr_brigade_cleanup(b) here.

> + APR_BRIGADE_CONCAT(b, ctx->tmpbb);
> e = APR_BRIGADE_FIRST(b);
>
> ctx->data_sent = 1;

Regards

RĂ¼diger


sf at sfritsch

Oct 4, 2009, 2:01 AM

Post #2 of 2 (157 views)
Permalink
Re: svn commit: r821471 - in /httpd/httpd/trunk: CHANGES modules/filters/mod_deflate.c modules/filters/mod_sed.c modules/http/chunk_filter.c server/protocol.c [In reply to]

On Sunday 04 October 2009, Ruediger Pluem wrote:
> To be on the safe side we should do apr_brigade_cleanup(b) here.
>
Thanks. Fixed in r821481

Apache dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.