Broken autoconf mmap test

Corinna Vinschen corinna-cygwin@cygwin.com
Thu Mar 24 15:56:00 GMT 2011


On Mar 24 09:31, Brian Ford wrote:
> On Thu, 24 Mar 2011, Corinna Vinschen wrote:
> 
> > In case of MAP_PRIVATE, anonymous maps are implemented using
> > VirtualAlloc.  The size of the allocated space is always a multiple of
> > 64K.  After creating it, the file content is simply copied over.
> > Full stop.  Easy.
> 
> I'd hate to pay the full read/write file I/O penalty on map/unmap for
> applications that use this technique to do small amounts of random I/O
> (normally just the touched pages).  You would need page initialized/dirty
> bit book keeping combined with paged I/O I think to do it well for both
> read and write.

I'm not sure what you're up to.  I explained how to do it in my OP.  You
don't have any problem with MAP_PRIVATE mappings and mapping with only
PROT_READ access.  Only MAP_SHARED with MAP_WRITE access are something
to worry about.

Care to explain your worries in more detail?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat



More information about the Cygwin-developers mailing list