apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <cliffwool...@yahoo.com>
Subject Re: setaside funcs
Date Sat, 29 Sep 2001 22:20:15 GMT
On Sat, 29 Sep 2001, Justin Erenkrantz wrote:

> +1 on option 1 (reopening and re-mmaping only when necessary).  It's
> performance would *have* to be better than doing a silly memcpy.

It occurs to me that there could be a bit of a snag here that we'll have
to work around, which is this: when file_read() mmaps the file, it mmaps
it starting at the current bucket offset.  That makes sense, because if
our file bucket only represents the last 100 bytes of a 10MB file, there's
no sense in MMAPing the whole 10MB.  The only trick is that when you go
BACK to representing it as a file, you have to figure out what the
original offset into the file was and what the current mmap bucket offset
is and add those together to get the absolute offset into the file.  And I
don't think we currently store the original offset.  Oh well, just one
more thing to store, I guess....


   Cliff Woolley
   Charlottesville, VA

View raw message