alexcrichton opened PR #3757 from less-mprotect to main:
This tweaks the internal organization of the
MemFdSlotto avoid some
syscalls in the default case as well as opportunistically in the pooling
case. The two cases added here are:
A
MemFdSlotis now created with a specified initial size. For
pooling this is 0 but for the on-demand case this can be non-zero.When
instantiateis called with no prior image and the sizes match
(as will be the case for on-demand allocation) thenmprotectis
skipped entirely.In the
clear_and_remain-readycase themprotectis skipped if the
heap wasn't grown at all.This should avoid ever using
mprotectunnecessarily and makes the
ranges wemprotecta bit smaller as well.<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
alexcrichton requested cfallin for a review on PR #3757.
cfallin submitted PR review.
cfallin submitted PR review.
cfallin created PR review comment:
s/should be of have/should have/
alexcrichton updated PR #3757 from less-mprotect to main.
alexcrichton merged PR #3757.
Last updated: Dec 06 2025 at 06:05 UTC