-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
On Linux, MAP_FIXED | MAP_PRIVATE at MAP_SHARED alters the attributes of mapped pages from MAP_SHARED to MAP_PRIVATE.
It's not possible to implement except some special cases. For example, mmap( MAP_FIXED | MAP_PRIVATE ) at entire MAP_SHARED only pages. Or mmap() multiple length of a page size with DosAllocMemEx( OBJ_LOCATION ) and aliasAtAddress(). Only these two cases which are same essentially are possible.
Fortunately, however, this is not a POSIX-compliant behavior. Just place in lowest todo list.
https://github.com/komh/os2compat/blob/master/testcase/mmap-7.c is the test case.
And see https://stackoverflow.com/questions/22416989/change-an-mmapd-memory-region-from-map-shared-to-map-private from where I got the test case.