Wasmtime: set the cranelift_wasm::Heap's min size (#5522)
This unlocks certain bounds checking optimizations in some configurations. Wasn't able to measure any delta in sightglass, but still worth doing anyways.
This commit is contained in:
@@ -1471,7 +1471,7 @@ impl<'module_environment> cranelift_wasm::FuncEnvironment for FuncEnvironment<'m
|
|||||||
});
|
});
|
||||||
Ok(self.heaps.push(HeapData {
|
Ok(self.heaps.push(HeapData {
|
||||||
base: heap_base,
|
base: heap_base,
|
||||||
min_size: 0,
|
min_size: self.module.memory_plans[index].memory.minimum * u64::from(WASM_PAGE_SIZE),
|
||||||
offset_guard_size,
|
offset_guard_size,
|
||||||
style: heap_style,
|
style: heap_style,
|
||||||
index_type: self.memory_index_type(index),
|
index_type: self.memory_index_type(index),
|
||||||
|
|||||||
Reference in New Issue
Block a user