This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: Broken autoconf mmap test
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin-developers at cygwin dot com
- Date: Thu, 24 Mar 2011 16:56:12 +0100
- Subject: Re: Broken autoconf mmap test
- References: <4D89D4AA.6070903@cornell.edu> <20110323132622.GM31220@calimero.vinschen.de> <4D89FEC7.3000107@cornell.edu> <20110323154421.GN31220@calimero.vinschen.de> <4D8A308F.508@cornell.edu> <4D8A3206.7070502@redhat.com> <4D8A3329.7050009@redhat.com> <20110323181507.GV31220@calimero.vinschen.de> <20110324095945.GD31220@calimero.vinschen.de> <Pine.CYG.4.58.1103240918290.2592@PC1163-8460-XP.flightsafety.com>
- Reply-to: cygwin-developers at cygwin dot com
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