Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use MAP_NORESERVE when available in mmap (Linux) #9506

Merged
merged 1 commit into from
Dec 27, 2020

Conversation

Nekotekina
Copy link
Member

This flag is used in huge mappings allocated only for reserve purpose but possibly unused. From the description:

MAP_NORESERVE
Do not reserve swap space for this mapping.  When swap
              space is reserved, one has the guarantee that it is
              possible to modify the mapping.  When swap space is not
              reserved one might get SIGSEGV upon a write if no physical
              memory is available. ...

It should make it more close to what MEM_RESERVE flag does on Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant