Use emulator options' memory_size to determine size of wasm buffer, allowing for
dynamically sized emulator memory sizes. Note: This may not always work due to browser limitations.
This commit is contained in:
parent
8b5dd87671
commit
c8cfffc880
|
@ -243,7 +243,7 @@ function V86Starter(options)
|
|||
v86util.load_wasm(
|
||||
wasm_file,
|
||||
{ "env": wasm_shared_funcs },
|
||||
WASM_MEMORY_SIZE * 1024 * 1024,
|
||||
options["memory_size"] + INTERNAL_MEM_SIZE,
|
||||
WASM_TABLE_SIZE,
|
||||
wm => {
|
||||
wm.instance.exports["__post_instantiate"]();
|
||||
|
|
|
@ -357,9 +357,9 @@ const P_DO_MANY_CYCLES = 2;
|
|||
|
||||
var WASM_TABLE_SIZE = 0x10000;
|
||||
|
||||
// XXX: This should not be fixed
|
||||
// in M
|
||||
const WASM_MEMORY_SIZE = 256;
|
||||
/** @const */
|
||||
// The space we need for misc internal state before the beginning of mem8; see global_pointers.h
|
||||
const INTERNAL_MEM_SIZE = 4096 + 0x100000 * 6;
|
||||
|
||||
/** @const */
|
||||
const WASM_PAGE_SIZE = 64 * 1024;
|
||||
|
|
Loading…
Reference in a new issue