This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

?mmap?



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]