Stream: git-wasmtime

Topic: wasmtime / PR #10495 Don't allocate on the heap for empty...


view this post on Zulip Wasmtime GitHub notifications bot (Mar 31 2025 at 19:07):

alexcrichton opened PR #10495 from alexcrichton:dont-allocate-empty-bitset to bytecodealliance:main:

This commit fixes an issue where CompoundBitSet::with_capacity(0) would end up allocation space on the heap due to an off-by-one in the implementation. When calculating the maximum bit that might be set the implementation now subtracts one. This more accurately models the maximum bit that could be set and additionally guarantees the property that with_capacity(0) does not allocate anything on the heap.

<!--
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 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 (Mar 31 2025 at 19:07):

alexcrichton has marked PR #10495 as ready for review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 31 2025 at 19:07):

alexcrichton requested cfallin for a review on PR #10495.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 31 2025 at 19:07):

alexcrichton requested wasmtime-compiler-reviewers for a review on PR #10495.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 31 2025 at 19:16):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 31 2025 at 21:19):

alexcrichton merged PR #10495.


Last updated: Apr 18 2025 at 18:04 UTC