bytecodealliance / wasmtime

A fast and secure runtime for WebAssembly
https://wasmtime.dev/
Apache License 2.0
14.81k stars 1.24k forks source link

Allow 4G memories by default in the pooling allocator #8849

Closed alexcrichton closed 1 week ago

alexcrichton commented 1 week ago

This commit raises the default setting of max_memory_size in the pooling allocator from 10M to 4G. This won't actually impact the virtual memory reserved in the pooling allocator because we already reserved 6G of virtual memory for each linear memory this instead allows access to all of it by default. This matches the default behavior of Wasmtime for the non-pooling allocator which is to not artificially limit memory by default.

The main impact of this setting is that the memory-protection-keys feature, which is disabled by default, will have no effect by default unless max_memory_size is also configured to something smaller than 4G. The documentation has been updated to this effect.

Closes #8846