Stream: git-wasmtime

Topic: wasmtime / PR #7364 Pku wast


view this post on Zulip Wasmtime GitHub notifications bot (Oct 25 2023 at 18:26):

abrown opened PR #7364 from abrown:pku-wast to bytecodealliance:main:

This change stems from how slicing memory slots into MPK-protected regions limits the number of memories each store can access: e.g., with fifteen keys in use, a store only has access to a fifteenth of the available slots. If we simply multiple the number of memory slots needed to run the *.wast spec tests by fifteen, we run out of available memory. This limits the number of protection keys used to two, which still allows us to test the functionality without reserving too much memory.

Also, if Wasmtime is ever embedded in an application that also uses memory protection keys, it could be useful to limit how many Wasmtime allocates and uses.. This change not only limits the number of protection keys used at runtime, but takes that
further to attempt to limit the initial number of keys allocated. The unfortunate side effect of using a OnceLock is that the max setting is only applicable on the first invocation, the one that sets the OnceLock.


Last updated: Oct 23 2024 at 20:03 UTC