implement emscripten resize_heap

This commit is contained in:
Mark McCaskey
2019-04-08 16:17:34 -07:00
committed by Syrus
parent 8ba5ea2a08
commit fec65a262e
2 changed files with 29 additions and 22 deletions

View File

@ -6,6 +6,8 @@ use std::{
pub const WASM_PAGE_SIZE: usize = 65_536;
pub const WASM_MAX_PAGES: usize = 65_536;
// From emscripten resize_heap implementation
pub const WASM_MIN_PAGES: usize = 256;
/// Units of WebAssembly pages (as specified to be 65,536 bytes).
#[derive(Serialize, Deserialize, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]