Browse Source

Double the default allowed table elements (#8527)

* Double the default allowed table elements

This commit doubles the default allowed table elements per table in the
pooling allocator from 10k to 20k. This helps to, by default, run the
module produced in #8504.

* Update docs on deafults
pull/8532/head
Alex Crichton 6 months ago
committed by GitHub
parent
commit
4fef150816
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      crates/wasmtime/src/config.rs
  2. 4
      crates/wasmtime/src/runtime/vm/instance/allocator/pooling.rs

2
crates/wasmtime/src/config.rs

@ -2645,7 +2645,7 @@ impl PoolingAllocationConfig {
}
/// The maximum table elements for any table defined in a module (default is
/// `10000`).
/// `20000`).
///
/// If a table's minimum element limit is greater than this value, the
/// module will fail to instantiate.

4
crates/wasmtime/src/runtime/vm/instance/allocator/pooling.rs

@ -156,7 +156,9 @@ impl Default for InstanceLimits {
total_stacks: 1000,
core_instance_size: 1 << 20, // 1 MiB
max_tables_per_module: 1,
table_elements: 10_000,
// NB: in #8504 it was seen that a C# module in debug module can
// have 10k+ elements.
table_elements: 20_000,
max_memories_per_module: 1,
memory_pages: 160,
#[cfg(feature = "gc")]

Loading…
Cancel
Save