Skip to content

bpo-42232: mmap module add Darwin specific madvise options.#23076

Merged
miss-islington merged 3 commits into
python:masterfrom
devnexen:mmap_module_upd_for_darwin
Nov 21, 2020
Merged

bpo-42232: mmap module add Darwin specific madvise options.#23076
miss-islington merged 3 commits into
python:masterfrom
devnexen:mmap_module_upd_for_darwin

Conversation

@devnexen

@devnexen devnexen commented Nov 1, 2020

Copy link
Copy Markdown
Contributor

https://bugs.python.org/issue42232

Automerge-Triggered-By: GH:ronaldoussoren

@devnexen devnexen changed the title mmap module add Darwin specific madvise options. bpo-42232: mmap module add Darwin specific madvise options. Nov 1, 2020

@jstasiak jstasiak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me on Mac OS 10.14.6:

Python 3.10.0a1+ (remotes/origin/pr/23076:b06ca8b38c28, Nov  2 2020, 20:52:28) 
[Clang 10.0.1 (clang-1001.0.46.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import mmap
>>> mmap.MADV_FREE_REUSABLE
7
>>> mmap.MADV_FREE_REUSE
8

What worries me a little is I couldn't find any documentation on those, but I guess it is what it s. One change I'd make is add these to the MADV_* Constants section in the docs since others are already listed.

@devnexen

devnexen commented Nov 2, 2020

Copy link
Copy Markdown
Contributor Author

Works for me on Mac OS 10.14.6:

Python 3.10.0a1+ (remotes/origin/pr/23076:b06ca8b38c28, Nov  2 2020, 20:52:28) 
[Clang 10.0.1 (clang-1001.0.46.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import mmap
>>> mmap.MADV_FREE_REUSABLE
7
>>> mmap.MADV_FREE_REUSE
8

What worries me a little is I couldn't find any documentation on those, but I guess it is what it s. One change I'd make is add these to the MADV_* Constants section in the docs since others are already listed.

It does not appear in the man page (I stumbled across :-)) but the system reports more faithfully the memory usage than MADV_FREE could.

@ronaldoussoren ronaldoussoren left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@miss-islington

Copy link
Copy Markdown
Contributor

Sorry, I can't merge this PR. Reason: Pull Request is not mergeable.

adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants