alexcrichton requested pchickey for a review on PR #10903.
alexcrichton requested wasmtime-core-reviewers for a review on PR #10903.
alexcrichton opened PR #10903 from alexcrichton:refactor-tables to bytecodealliance:main:
This commit is similar to a prior commit modifying memories which refactors the internals of
wasmtime::Tableto not longer use aStoredindex. Instead aStoreInstanceIdand aDefinedTableIndexis used instead. This enables construction of external-facing types to be trivial and zero-cost.This additionally notably fixes an issue where triggering a GC in a store would unconditionally create a
Table, pushing onto an internal vector in the store. This then would never be deallocated because the internal table lived as long as theStore. In effect this meant that triggering a GC would end up leaking memory by pushing more items onto internalStoretable. This is fixed through this commit because creating awasmtime::Tableis now "free" and no longer requires any allocations.<!--
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 ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
fitzgen submitted PR review:
Nice
alexcrichton updated PR #10903.
alexcrichton has enabled auto merge for PR #10903.
alexcrichton updated PR #10903.
alexcrichton has enabled auto merge for PR #10903.
alexcrichton merged PR #10903.
Last updated: Dec 06 2025 at 07:03 UTC