bpo-36648: fix mmap issue for VxWorks by LihuaZhao · Pull Request #12394 · python/cpython (original) (raw)
Thanks for your comment, However, 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 (the file that I changed) try to specify MAP_SHARED or MAP_PRIVATE based on operate system requirement, Linux require MAP_SHARED, VxWorks require MAP_PRIVATE, this different is hidden by this module, and python user won't be affected.
This change doesn't change the behavior of other platforms, also belong to adapt python to VxWorks, so I think we don't need a new bpo.
VxWorks will run pass all of test_mmap.py case related with anonymous map, so we don't need to document for python user, and I also check the mmap.rst, there isn't document to introduce how operation support them, so I think we don't need to document it.