apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <b...@wstoddard.com>
Subject Re: file_setaside()
Date Wed, 27 Jun 2001 20:09:32 GMT

>
> > > Sooner or later, we are going to be writing the file someplace.  That
> > > could be the network, or it could be into memory to do some mucking with
> > > the data.  Since we are either dup'ing it or mmap'ing it, I figured we
> > > could be conservative here and mmap the data.  If we dup it here, and then
> > > have to read, then we have dup'ed and mmap'ed.  This way, we only mmap the
> > > data.
> >
> > The setaside() could be called on *really* large files. Calling mmap could
> > be a very bad thing. Just dup the FILE bucket and leave it at that. The
> > decision to do the mmap can/should come when it becomes necessary.
>
> Why is calling mmap on a large file a bad thing?
>
> Ryan

file_make_map() will not attempt to map more than MMAP_LIMIT bytes at a time (4*1024*1024)
so this is not an issue for file_setaside(). If a file exceeds this limit, it will be
dup'ed.

I have not had much time to do any performance analysis of all the recent changes.  Hope
Bill doesn't find any nasty suprises else Bill will be a pest, more so than normal :-)

Bill


Mime
View raw message