[issue45528] mmap: constants not listed in the documentation

Michael Wayne Goodman report at bugs.python.org
Tue Oct 19 17:33:16 EDT 2021


Michael Wayne Goodman <goodman.m.w at gmail.com> added the comment:

I have added a draft PR on GitHub that adds the lists of constants. As mentioned in the PR, there are a few things that I think could be added before merging:

1. Update descriptions in mmap.mmap, and maybe the intro, to link to relevant sections.

2. Verify the availability of some constants. I only have access to a Unix system, so I cannot easily check if, e.g., the PROT_* constants are unavailable on Windows, or just unused.

3. Provide descriptions for ALLOCATIONGRANULARITY and PAGESIZE. As I understand, allocations occur in chunks at the size of ALLOCATIONGRANULARITY on Windows and PAGESIZE on Unix, although (presumably for portability) mmap.ALLOCATIONGRANULARITY is set to be equal to mmap.PAGESIZE on Unix systems. So does mmap.PAGESIZE have any use on Windows?

I'm not an expert of the low-level implementation of mmap, so I appreciate any help with the above (particularly (2) and (3)).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45528>
_______________________________________


More information about the Python-bugs-list mailing list