From: Ruediger Pluem Date: Tue, 11 Dec 2007 12:48:39 +0000 (+0000) Subject: * Do not set filter context brigade to NULL (and thus need to recreate it each X-Git-Tag: 2.3.0~1154 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=754135d1f2289a65002a73c928a57203c62ae379;p=thirdparty%2Fapache%2Fhttpd.git * Do not set filter context brigade to NULL (and thus need to recreate it each time) but empty it (via APR_BRIGADE_PREPEND) and reuse it. Submitted by: Stefan Fritsch Reviewed by: rpluem git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@603227 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 18a2eb65ab1..77510e63ae8 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,10 @@ Changes with Apache 2.3.0 [ When backported to 2.2.x, remove entry from this file ] + *) core: Lower memory consumption of ap_r* functions by reusing the brigade + instead of recreating it during each filter pass. + [Stefan Fritsch ] + *) mod_proxy_ajp: Use 64K as maximum AJP packet size. This is the maximum length we can squeeze inside the AJP message packet. [Mladen Turk] diff --git a/server/protocol.c b/server/protocol.c index 933f9827638..e092e474148 100644 --- a/server/protocol.c +++ b/server/protocol.c @@ -1397,9 +1397,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_old_write_filter( * can simply insert our buffered data at the front and * pass the whole bundle down the chain. */ - APR_BRIGADE_CONCAT(ctx->bb, bb); - bb = ctx->bb; - ctx->bb = NULL; + APR_BRIGADE_PREPEND(bb, ctx->bb); } return ap_pass_brigade(f->next, bb);