alexcrichton opened PR #3757 from less-mprotect
to main
:
This tweaks the internal organization of the
MemFdSlot
to avoid some
syscalls in the default case as well as opportunistically in the pooling
case. The two cases added here are:
A
MemFdSlot
is now created with a specified initial size. For
pooling this is 0 but for the on-demand case this can be non-zero.When
instantiate
is called with no prior image and the sizes match
(as will be the case for on-demand allocation) thenmprotect
is
skipped entirely.In the
clear_and_remain-ready
case themprotect
is skipped if the
heap wasn't grown at all.This should avoid ever using
mprotect
unnecessarily and makes the
ranges wemprotect
a 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: Nov 22 2024 at 17:03 UTC