alexcrichton opened PR #15032 from alexcrichton:limit-slots-not-live to bytecodealliance:main:
This commit updates the implementation originally added in #14732 to limit component model handles within a store to instead limit handle slots, not live entries. The change here is made because while limiting live entries limits memory consumption the store doesn't currently shrink preexisting vectors. This means that live entries is a proxy for the possible high watermark of memory usage but is a bit lossy because previously allocated slots are also taking up memory. The change here is to effectively never decrement the count of slots within the store since those vectors are never shrunk at this time. This is still not expected to greatly affect components in the wild since the handle limit is high enough to not hit it in typical usage.
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.mdPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton removed the review request for wasmtime-core-reviewers from PR #15032.
alexcrichton requested pchickey for a review on PR #15032.
alexcrichton requested wasmtime-core-reviewers for a review on PR #15032.
:thumbs_up: pchickey submitted PR review.
alexcrichton added PR #15032 Charge handle table slots, not live entries to the merge queue.
:check: alexcrichton merged PR #15032.
alexcrichton removed PR #15032 Charge handle table slots, not live entries from the merge queue.
Last updated: Oct 31 2026 at 23:03 UTC