httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@covalent.net
Subject Re: cvs commit: apache-2.0/src/main http_protocol.c
Date Thu, 09 Nov 2000 03:23:23 GMT

> > Note that TRANSIENT and IMMORTAL do not need refcounting. The copied bucket
> > can just refer to the same data.
> 
> Transients most definately need to be ref-counted.  If they aren't, then
> you won't know the ref-count when setting it aside.  If we ref-count, then
> we can insert the same transient string into the brigade multiple times as
> multiple instances of the same string, and we will only copy the data
> once.

That probably isn't clear at all.  You are correct that currently
transients don't need to be ref-counted.  However, that limits transient
data's usability, because a given transient string can only appear in a
bucket brigade once optimally.  If it occurs twice, then we have two
buckets (one for each instance), and we copy it twice whenever we set it
aside.  If we ref-count the transient buckets, then we can insert a
transient string multiple times in a single brigade, and we will only copy
it once.

Ryan
_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Mime
View raw message