From 754135d1f2289a65002a73c928a57203c62ae379 Mon Sep 17 00:00:00 2001 From: Ruediger Pluem Date: Tue, 11 Dec 2007 12:48:39 +0000 Subject: [PATCH] * 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 --- CHANGES | 4 ++++ server/protocol.c | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 18a2eb65ab..77510e63ae 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 933f982763..e092e47414 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); -- 2.40.0