httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manoj Kasichainula <man...@io.com>
Subject Re: {PATCH} ap_put_statinfo
Date Thu, 04 Nov 1999 18:45:07 GMT
On Thu, Nov 04, 1999 at 10:59:49AM -0000, David Reid wrote:
> OK.
> 
> From: Manoj Kasichainula <manojk@io.com>
> > Why is not passing a size cleaner? I think any APR mmap should support
> > both the size and offset arguments, unless there's a platform that
> > can't do this.

Uhhh, that's not what you did. :)

What I was saying is that we only need one APR mmap function:
apr_mmap_create or something, which would take both a size and offset
parameter. Both parameters are useful to Apache, if not now, then
later, for sending byte ranges efficiently. And the simplified
versions of these functions that are in APR now simply aren't
necessary, because they can be done using combinations of other APR
calls.

ap_mmap_size_create => manojs_apr_mmap with offset = 0
ap_mmap_create => manojs_apr_mmap with offset = 0, size = size of the
file.

This way, you get less complexity; a coder only has a single mmap
function to worry about. Also, you don't have to pollute the mmap.c
file with more knowledge about files (i.e. how to call stat()), so you
get simpler functions which are easier to maintain and are more likely
to be sharable.

Did I convince you yet? If not, please at least have the current
functions call a more generic mmap with size + offset, so that there
isn't so much duplicated code.

-- 
Manoj Kasichainula - manojk at io dot com - http://www.io.com/~manojk/

Mime
View raw message