httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <jor...@redhat.com>
Subject Re: Proposed patch: always cleanup brigades in ap_pass_brigade
Date Mon, 25 Apr 2005 21:26:42 GMT
On Mon, Apr 25, 2005 at 03:58:59PM -0500, Rici Lake wrote:
> If we accept that the contents of a brigade are "undefined" when 
> ap_pass_brigade returns, the caller has three options:
> -- call cleanup and reuse the brigade
> -- call destroy (which will first call cleanup)
> -- drop it on the floor and let destroy be called by the cleanup 
> function
> 
> In no case can it make any use of the brigade's contents (they're 
> "undefined"), so cleanup must be called just after ap_pass_brigade 
> returns.

But in the latter two cases, adding a apr_brigade_cleanup() call to
ap_pass_brigade() is completely redundant.  To me, you need to make the
argument that the former case is so prevalent that it's worth an
additional API guarantee, and the additional (small) overhead in in
ap_pass_brigade.  I don't see it really...

(and the gcc tail-call optimisation of ap_pass_brigade *is* such a handy
feature when reading backtraces anyway :)

> /me continues the tradition of creating flames out of bucket brigades. 
> You'd think it would be the reverse :)

Hehe ;)


Mime
View raw message