On Thu, Apr 2, 2020 at 6:39 AM Ruediger Pluem <rpl...@apache.org> wrote:
>
> > +#define AP_BUCKET_IS_MORPHING(e)    ((e)->length == (apr_size_t)-1)
>
> Nitpick: After having a second thought on the whole thing, I think the above 
> name is misleading to some extend. If MMAP is enabled
> a file bucket is also a morphing bucket as a read on it causes the bucket to 
> split in an MMAP bucket and a shorter file bucket.
> A MMAP bucket consumes at least address space and I vaguely remember cases 
> from the past (back in 32 bit times) where filters that
> processed (doing apr_bucket_read) a whole brigade at once without passing 
> results down the chain on a regular basis caused the
> address space to be exhausted by MMAP buckets if the file bucket was huge.

How about a less subjective:
  #define AP_BUCKET_HAS_LENGTH(e) ((e)->length != (apr_size_t)-1)
?

If find it quite painful to type e->length == (apr_size_t)-1, though I
could simply use -1 and rely on unsigned promotion..

Regards,
Yann.

Reply via email to