This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
?mmap?
- To: cygwin at cygwin dot com
- Subject: ?mmap?
- From: Claus Wagner <cwagner at cs dot Technion dot AC dot IL>
- Date: Mon, 19 Mar 2001 15:43:08 +0200
Hi!
This e-mail concerns the current "mmap" implementation.
When I map the same piece of a file twice into the virtual address space (using
*mmap*)
the second call returns the same address as the first call has returned.
There are some cases, which make a multiple mapping of the same piece of a file
reasonable.
For example setting different protection attributes for two regions of one file:
....
ptr1 = mmap(fd,...,offset);
ptr2 = mmap(fd,...,offset);
....
mprotect(ptr1,PROT_READ,PAGE_SIZE);
mprotect(ptr2,PROT_WRITE|PROT_READ,PAGE_SIZE);
.....
Anyway, I don't think, that the semantic of mmap should be like it is right now
in your implementaion.
Regards Claus Wagner.
ps: ... or should I read the POSIX standard :-)
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple