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:16:43 GMT
On Wed, 8 Nov 2000, Greg Stein wrote:

> But you still need a copy() mechanism to create a second bucket that refers
> to the same data.
> 
> 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.

> PIPE and SOCKET need refcounting, but they cannot be copied. The data must
> first be acquired, then it can be copied.

We aren't copying data, we are copying the bucket, so the dup function
should just create a second bucket that points to the same
pipe/socket.  The data should not be copied first.  Now, having said that,
it is incredibly unlikely that anybody will ever dup a pipe/socket bucket,
because you really need either the data or length before you know if you
want to dup or not.

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


Mime
View raw message