> Ok, I'm back to fixing all the 64 bit off_t discrepancies in APR/Apache.
>
> Can we basically agree that a "Bucket" can never be bigger than apr_ssize_t?
Is the bucked backed by RAM?  If so, then I agree.  file buckets that can be 
sent down the chain for
use by sendfile should not have this restriction. If you need, for whatever 
reason, to MMAP or read
in the file, then sure apr_ssize_t is a reasonable upper limit (we'll set the 
actual limit much
lower in practice).

> I've no problems with using apr_off_t for the length of a full Brigades 
> itself.
> That means we can split a brigade on any apr_off_t, but would only need to
> split a bucket on an apr_ssize_t.  It implies a 'Pipe' bucket can't generate
> more than 2^31 bytes without breaking the code.

I don't follow the comment about a pipe bucket.  Sure, if you attempt to buffer 
the entire pipe,
there is a limit and 2^31 is not an unreasonable limit. In practice, we would 
never attempt to
buffer this much.

>
> This means a huge file would need to be split by the caller into multiple file
> buckets, no longer than ssize_t.  Is this reasonable?
>
Yes, provided this in no way implies that you cannot have a file_bucket that 
references an open fd
to a file of arbitray size.

Bill


Reply via email to