This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: msync patch
- From: Corinna Vinschen <cygwin-patches at cygwin dot com>
- To: cygwin-patches at cygwin dot com
- Date: Mon, 11 Mar 2002 21:30:18 +0100
- Subject: Re: msync patch
- References: <006201c1c927$8d05f550$0100a8c0@advent02>
On Mon, Mar 11, 2002 at 06:07:03PM -0000, Chris January wrote:
> This patch modifies msync in mmap.cc so that you can call msync with an
> address which occurs in the middle of an mmap'ed region. It also fixes the
> bug where the address in the relevant mmap_record would not match the one
> passed to msync if the offset of the mmap'ed region within the file was not
> on a dwAllocationGranularity boundary.
First I was inclined to refuse the patch since SUSv2 requires
`addr' to be a multiple of getpagesize() but POSIX doesn't
so it's better trying to be POSIX compliant here.
However, the patch only checks the beginning and the end of the
given address range but the address range could span over a
non-mapped region which is a fault from msync's point of view.
I've checked in a slightly different version which uses a method
I implemented today. msync() now tests if the whole address range
is contigeously mmap'd, returning ENOMEM otherwise.
I'd appreciate if you could give it a try.
Thanks,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Developer mailto:cygwin@cygwin.com
Red Hat, Inc.