apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject brigade/bucket splitting (was: Re: cvs commit: apr-util STATUS)x
Date Mon, 11 Dec 2000 23:46:19 GMT
On Sat, Dec 09, 2000 at 01:14:57PM -0800, rbb@covalent.net wrote:
> I'll buy this.  I can see this being somewhat useful.  Part of me thinks
> this should be implemented as a brigade_seek function.  The calling code
> would then be responsible for calling ap_bucket_split and
> ap_brigade_split, but I am not sure if I agree with that or not yet.

I've been thinking of a bucket split at a specified point. That allows you
to copy the buckets before/after the split point.

This also means we're copying *a* bucket, rather than needing to pass
start/end values into a bucket copy.

If we go back to my original email, and we have a brigade such as:

    B1 -> B2 -> B3/4 -> B5 -> B6/7 -> B8

And we want to copy from [4..6], then we split at the correct point within
bucket B3/4 and B6/7. That gives us this brigade:

    B1 -> B2 -> B3 -> B4 -> B5 -> B6 -> B7 -> B8

Now we can copy B4..B6.

The reason that I asked for a bucket return value was so that we could split
the brigade at point P3/4, and get a pointer to B4 back (the start of the
copy). We split at point P6/7 and get P7 back (the bucket after the last to


Greg Stein, http://www.lyra.org/

View raw message