mmap and MAP_FIXED

Eric Blake ebb9@byu.net
Fri Feb 25 19:29:00 GMT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Corinna Vinschen on 2/25/2005 5:00 AM:
> The reason that MAP_FAILED only works on 64K boundaries so far is,
> that I didn't handle this case.  Usually there are not many good
> reasons to use MAP_FIXED.  However, I've checked in a patch which
> tries to handle MAP_FIXED on 4K boundaries, but only in the anonymous
> case.

While you are at it, POSIX requires an update to underlying file's ctime
sometime between mmap(... MAP_SHARED, PROT_WRITE ...) and the
corresponding munmap() or msync() if the mapped region was written to.  If
Windows correctly updates mtime on a mapped file, then one possible way to
do this might be: when munmap()ing, if mtime is newer than ctime (but less
than or equal to now), adjust ctime to match mtime.

- --
Life is short - so eat dessert first!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCHymH84KuGfSFAYARAjlKAJ4gmCNi638o+KZGuc0w+O9fOlrm1wCfZVdt
/ELwbzRBKloMYluTFzu2O84=
=uhzz
-----END PGP SIGNATURE-----

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list