mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-29 08:31:32 +00:00
[WIP] Improved memory handling (#56)
* Improved memory handling * Fix memory accessibility * Fix formatting
This commit is contained in:
committed by
Lachlan Sneff
parent
64eff86395
commit
ff45aea0ea
@ -509,7 +509,7 @@ impl Instance {
|
||||
let mem = &mut memories[init.memory_index.index()];
|
||||
let end_of_init = offset + init.data.len();
|
||||
if end_of_init > mem.current_size() {
|
||||
let grow_pages = (end_of_init / LinearMemory::WASM_PAGE_SIZE) + 1;
|
||||
let grow_pages = (end_of_init / LinearMemory::PAGE_SIZE as usize) + 1;
|
||||
mem.grow(grow_pages as u32)
|
||||
.expect("failed to grow memory for data initializers");
|
||||
}
|
||||
|
Reference in New Issue
Block a user