Skip to content

Haiku: Clean up redundant flags#127502

Open
trungnt2910 wants to merge 1 commit intodotnet:mainfrom
trungnt2910:dev/trungnt2910/haiku-pal
Open

Haiku: Clean up redundant flags#127502
trungnt2910 wants to merge 1 commit intodotnet:mainfrom
trungnt2910:dev/trungnt2910/haiku-pal

Conversation

@trungnt2910
Copy link
Copy Markdown
Contributor

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/

Part of #55803.

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/
Copilot AI review requested due to automatic review settings April 28, 2026 12:23
@github-actions github-actions Bot added the area-PAL-coreclr only for closed issues label Apr 28, 2026
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Apr 28, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_NORESERVE from PAL virtual memory reservation flags on Haiku.
  • Removed MAP_NORESERVE from 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.

Comment thread src/coreclr/pal/src/map/virtual.cpp
Comment thread src/coreclr/gc/unix/gcenv.unix.cpp
Comment thread src/coreclr/gc/unix/gcenv.unix.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-PAL-coreclr only for closed issues community-contribution Indicates that the PR has been added by a community member os-haiku

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants