Subject: Re: [PATCH] Problems with Cygwin mmap/munmap (mmap.cc)
From: Christopher Faylor <[email-masked]>
To: "[email-masked]" <[email-masked]>
Cc: [email-masked]
Date: Tue, 28 Nov 2000 22:52:59 -0500

On Tue, Nov 28, 2000 at 11:45:58AM -0800, Zack Weinberg wrote:
>I might point out that we only want these things for mmap of anonymous
>memory.  If Cygwin used VirtualAlloc instead of CreateFileMapping with
>an invalid handle to implement anonymous mmap, then both behaviors
>would be implementable easily.  (I don't know if this would interfere
>with cygwin's brk() implementation, though.)

I think that I raised this specter before but, on reflection, this
implementation detail should matter.  We'd have the same issue with
VirtualAlloc or CreateFileMapping.

I think that you (Zack) noted that using VirtualAlloc actually might
save us some precious upper memory in the Windows 9x "OS"'s.

The problem, I think, is that VirtualAlloc space is not inherited.  We
could kludge around this, like we do with fork, by copying the regions
but that could slow down things a lot.

The Microsoft docs sometimes seem to imply that you can mark a
VirtualAlloc'ed region as shareable but I've never been able to get that
to work.

cgf

--
Want to unsubscribe from this list?
Send a message to [email-masked]