httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Fritsch ...@sfritsch.de>
Subject Re: Apache memory usage
Date Mon, 10 Dec 2007 21:42:42 GMT
On Sunday 09 December 2007, Ruediger Pluem wrote:
> But I think your patch to server/protocol.c can be done much
> simpler. Can you try the following and let us know if this helps as
> well:
>
>
> Index: server/protocol.c
> ===================================================================
> --- server/protocol.c   (Revision 602730)
> +++ server/protocol.c   (Arbeitskopie)
> @@ -1397,9 +1397,7 @@
>           * 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);
>

Yes, that works as well. I wanted to avoid calling APR_BRIGADE_PREPEND 
when the temporary brigade is empty. But I don't really know whether 
APR_BRIGADE_PREPEND is so expensive that this makes sense. An 
alternative would be to check this using APR_BRIGADE_EMPTY.

Thanks for the review.

Cheers,
Stefan

Mime
View raw message