apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject bucket and brigade sizes
Date Thu, 24 Jan 2002 09:20:31 GMT
This isn't a hard problem, people...

* a bucket can be a FILE, which means it could represent >2G of data. thus,
  its size is apr_off_t.

* if a single bucket is an apr_off_t, then a whole brigade will be, too

* read() is reading into memory, so it must be apr_size_t

* flatten() reads into memory, so it must be apr_size_t

* partition() doesn't have to read into mem, so its point is apr_off_t

So now somebody is going to say, "but how can read() be less than the
bucket?" Hello... we do it all the time. You read a *portion* and convert
the bucket to something else. You then insert a new bucket after 'self' for
the unread portion.

If sendfile() happens to be limited, then that is the problem for Apache.
The bucket code represents data. It is unrelated to sendfile().


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

View raw message