erikrose opened PR #15082 from erikrose:mmap-make-inaccessible to bytecodealliance:main:
Factor out what was getting to be a lot of repetition while I'm at it.
This is going to support the timing wheel in MMU interruption, getting a lot of unsafe code out of the wheel as compared to a lot of naked
mprotect()s in its original implementation.
erikrose edited PR #15082:
Factor out what was getting to be a lot of repetition while I'm at it.
This is going to support the timing wheel in MMU interruption, getting a lot of unsafe code out of the wheel. (Its original implementation had a lot of naked
mprotect()s.)
erikrose edited PR #15082:
Factor out what was getting to be a lot of repetition while I'm at it.
This is going to support the timing wheel in MMU interruption, allowing it to avoid calling a lot of naked
mprotect()s on its own.
github-actions[bot] added the label wasmtime:api on PR #15082.
erikrose edited PR #15082:
I recently noticed we already have this mmap abstraction layer, so I might as well use it in the timing wheel in MMU interruption. It would bear fruit if we ever add more platform support. The overhead is negligible: there's only 1 extra syscall (vs. the raw mprotects I was using), and that's on page allocation, which is done only during warmup.
Factor out what was getting to be a lot of repetition as well.
erikrose has marked PR #15082 as ready for review.
erikrose removed the review request for wasmtime-core-reviewers from PR #15082.
erikrose requested cfallin for a review on PR #15082.
erikrose requested wasmtime-core-reviewers for a review on PR #15082.
erikrose edited PR #15082.
erikrose edited PR #15082:
I recently noticed we already have this mmap abstraction layer, so I might as well use it in the timing wheel in MMU interruption. It would bear fruit if we ever add more platform support. It bears fruit now in reducing the number of conditional compilations referencing
cfg(has_mmu_interruption). The overhead is negligible: there's only 1 extra syscall (vs. the raw mprotects I was using), and that's on page allocation, which is done only during warmup.Factor out what was getting to be a lot of repetition as well.
erikrose updated PR #15082.
:thumbs_up: alexcrichton submitted PR review.
alexcrichton added PR #15082 Add a make_inaccessible() to the cross-platform mmap abstraction. to the merge queue
:check: alexcrichton merged PR #15082.
alexcrichton removed PR #15082 Add a make_inaccessible() to the cross-platform mmap abstraction. from the merge queue
Last updated: Oct 31 2026 at 23:03 UTC