apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: cvs commit: apr-util/buckets apr_brigade.c
Date Mon, 30 Sep 2002 06:12:49 GMT
On Sun, Sep 29, 2002 at 06:55:27PM -0700, Brian Pane wrote:
> On Sun, 2002-09-29 at 17:19, Greg Stein wrote:
> > One thing I just realized, though: if there is no flush function, then a
> > transient could be a problem. I just double-checked apr_brigade_write() and
> > it switches over to HEAP buckets for that case. Should _writev follow the
> > same pattern?
> You mean, in case the caller then deletes the underlying storage for the
> strings in the iovec?  Yes, in that case we should use heap buckets.


> I'll make a change for this.

You da man!

> Both the _writev and the _write functions
> really need a warning in the documentation: "not guaranteed to be zero
> copy, so build your own buckets if you're trying to pass very large
> amounts of data."

Well... amend that a bit: the caller doesn't have to build buckets IF they
pass a flush function. It will be zero-copy when a flush func is provided.

Really... *all* calls should have a flush function to encourage zero copy
operation. If a flush function is not used, then the caller should revisit
what they're doing with the brigade.


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

View raw message