anonymous mappings is not part of the POSIX standard, python user just need to specified -1 as fd value when do anonymous map, for example:
m = mmap.mmap(-1, 100)
then python adapter module(mmapmodule.c) try to specify MAP_SHARED or MAP_PRIVATE based on operate system requirement, Linux require MAP_SHARED, VxWorks require MAP_PRIVATE, this different should be hidden by this module, and python user won't be affected.
Currently, mmap is only adapted for the system which use MAP_SHARED when do anonymous map, VxWorks need be supported.
https://en.wikipedia.org/wiki/Mmap |