Skip to content

Add a make_inaccessible() to the cross-platform mmap abstraction. - #15082

Merged
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
erikrose:mmap-make-inaccessible
Oct 30, 2026
Merged

alexcrichton merged 1 commit into
bytecodealliance:mainfrom
erikrose:mmap-make-inaccessible

Conversation

@erikrose

@erikrose erikrose commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

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.

@github-actions github-actions Bot added the wasmtime:api Related to the API of the `wasmtime` crate itself label Oct 29, 2026
@erikrose
erikrose marked this pull request as ready for review October 30, 2026 14:36
@erikrose
erikrose requested a review from a team as a code owner October 30, 2026 14:36
@erikrose
erikrose requested review from cfallin and removed request for a team October 30, 2026 14:36
@erikrose erikrose changed the title Add a make_inaccessible() to the cross-platform-mmap abstraction. Add a make_inaccessible() to the cross-platform mmap abstraction. Oct 30, 2026
Factor out what was getting to be a lot of repetition while I'm at it.
@erikrose
erikrose force-pushed the mmap-make-inaccessible branch from d21f546 to decd3c6 Compare October 30, 2026 16:30
@alexcrichton
alexcrichton added this pull request to the merge queue Oct 30, 2026
Merged via the queue into bytecodealliance:main with commit c760c89 Oct 30, 2026
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wasmtime:api Related to the API of the `wasmtime` crate itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants