apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <cliffwool...@yahoo.com>
Subject Re: apr_buckets_file.c:file_read + XTHREAD
Date Wed, 28 Nov 2001 04:57:14 GMT
On Tue, 27 Nov 2001, Cliff Woolley wrote:

> APR_MMAP_LIMIT is exceeded.  That's because we give up on mmap entirely
> and read 8kb at a time frome the whole bigass file, even if all we wanted
> in the first place was the first 32 bytes or so (say for something like
> mod_mime_magic) and we're never going to touch the other 12MB.

Oops.  That's totally wrong.  That's what I get for typing faster than
I can think.  ;-)

Each time we read 8 more KB, we have another heap+file combination.  We
just keep pulling 8K off the front of the file bucket.  If we only ever
actually wanted to look at the first 32 bytes, when we call
apr_bucket_read() we'll get an 8KB heap bucket followed by a file bucket
containing the rest of the file, and we can still use sendfile() on that.
So ignore this part of the argument, it was crap.  :)

But the rest of the bogosity still stands, and I think OtherBill's and my
proposed change is still very worthwhile.


   Cliff Woolley
   Charlottesville, VA

View raw message