Haiku: Clean up redundant flags#127502
Open
trungnt2910 wants to merge 1 commit intodotnet:mainfrom
Open
Conversation
Clean up redundant `MAP_NORESERVE` flags for private `PROT_NONE` mappings. Newer versions of Haiku avoids "committing memory inside mmap for private mappings (i.e. those without MAP_SHARED) which are non-writable (i.e. without PROT_WRITE specified)". See: https://www.haiku-os.org/blog/waddlesplash/2024-02-13_haiku_activity_contract_report_january_2024/
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Removes the Haiku-specific use of MAP_NORESERVE in a few mmap flag construction sites, likely to standardize behavior or avoid relying on a flag that may not be supported/desired on Haiku.
Changes:
- Removed
MAP_NORESERVEfrom PAL virtual memory reservation flags on Haiku. - Removed
MAP_NORESERVEfrom GC reservation and decommit mmap flag sets on Haiku.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/coreclr/pal/src/map/virtual.cpp | Drops Haiku-specific MAP_NORESERVE from virtual memory reservation mmap flags. |
| src/coreclr/gc/unix/gcenv.unix.cpp | Drops Haiku-specific MAP_NORESERVE from GC reserve and decommit mmap flag sets. |
This was referenced Apr 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Clean up redundant
MAP_NORESERVEflags for privatePROT_NONEmappings.Newer versions of Haiku avoids "committing memory inside mmap for private mappings (i.e. those without MAP_SHARED) which are non-writable (i.e. without PROT_WRITE specified)".
See: https://www.haiku-os.org/blog/waddlesplash/2024-02-13_haiku_activity_contract_report_january_2024/
Part of #55803.