MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / table_elements

Method table_elements

crates/wasmtime/src/config.rs:4116–4119  ·  view source on GitHub ↗

The maximum table elements for any table defined in a module (default is `20000`). If a table's minimum element limit is greater than this value, the module will fail to instantiate. If a table's maximum element limit is unbounded or greater than this value, the maximum will be `table_elements` for the purpose of any `table.grow` instruction. This value is used to reserve the maximum space for

(&mut self, elements: usize)

Source from the content-addressed store, hash-verified

4114 /// Therefore, the space reserved for each instance is `tables *
4115 /// table_elements * sizeof::<*const ()>`.
4116 pub fn table_elements(&mut self, elements: usize) -> &mut Self {
4117 self.config.limits.table_elements = elements;
4118 self
4119 }
4120
4121 /// The maximum number of defined linear memories for a module (default is
4122 /// `1`).

Callers 15

store_limitsMethod · 0.45
small_pool_configFunction · 0.45
test_limitsFunction · 0.45
test_limits_table_onlyFunction · 0.45
growth_trapFunction · 0.45
memory_initFunction · 0.45
memory_guard_page_trapFunction · 0.45
memory_zeroedFunction · 0.45
table_limitFunction · 0.45

Calls

no outgoing calls

Tested by 6

test_limitsFunction · 0.36
test_limits_table_onlyFunction · 0.36
memory_zeroedFunction · 0.36
mainFunction · 0.36