Stream: git-wasmtime

Topic: wasmtime / PR #14507 Refactor and document `release_resid...


view this post on Zulip Wasmtime GitHub notifications bot (Oct 02 2026 at 23:54):

alexcrichton opened PR #14507 from alexcrichton:refactor-release-memory to bytecodealliance:main:

This commit first refactors the logic added in #14419 to avoid open-coding the index allocator internals in more than one location. A new AllocMode is used to encapsulate "only warm" and then the internal implementation of "take all warm slots" is a simpler loop than before.

This then additionally fixes a bug in the implementation where the decommit_pages call was done only for the first bytes_resident pages, but with features like PAGEMAP_SCAN enabled these bytes could be sparsely contained within the slot, so now the madvise happens for the entire slot rather than just the number of resident bytes.

Finally, this documents a consequence of the current implementation which is that concurrent instantiations may fail while the method is running. The fix doesn't seem worth it at this time so I figured it was at least good to document.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.md

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Oct 02 2026 at 23:54):

alexcrichton requested cfallin for a review on PR #14507.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 02 2026 at 23:54):

alexcrichton requested wasmtime-core-reviewers for a review on PR #14507.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 03 2026 at 01:56):

github-actions[bot] added the label wasmtime:api on PR #14507.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 04 2026 at 04:09):

:thumbs_up: cfallin submitted PR review:

This is much cleaner -- thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Oct 04 2026 at 04:09):

cfallin added PR #14507 Refactor and document release_resident_unused_memory a bit to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 04 2026 at 04:32):

:check: cfallin merged PR #14507.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 04 2026 at 04:32):

cfallin removed PR #14507 Refactor and document release_resident_unused_memory a bit from the merge queue.


Last updated: Oct 11 2026 at 04:10 UTC