mirror of
https://github.com/pezkuwichain/wasm-instrument.git
synced 2026-11-03 09:21:14 +00:00
samples and html fix
This commit is contained in:
1 parent
08ac853719
commit
a0f5f59bc0
3 files changed
+16
-4
No files matched your search
+3
-3
@@ -35,7 +35,7 @@
|
||||
|
||||
env.DYNAMICTOP_PTR = env.DYNAMICTOP_PTR || 0;
|
||||
env.STACKTOP = env.STACKTOP || 0;
|
||||
env.STACK_MAX = env.STACK_MAX || 0;
|
||||
env.STACK_MAX = env.STACK_MAX || 5*1024*1024;
|
||||
env.enlargeMemory = env.enlargeMemory || function() { throw "error enlarging memory"; };
|
||||
env.getTotalMemory = env.getTotalMemory || function() { return 65536 * 256; };
|
||||
env.abortOnCannotGrowMemory = env.abortOnCannotGrowMemory || function() { throw "abort growing memory"; };
|
||||
@@ -45,10 +45,10 @@
|
||||
env.tableBase = env.tableBase || 0;
|
||||
|
||||
if (!imports.env.memory) {
|
||||
imports.env.memory = new WebAssembly.Memory({ initial: 256 });
|
||||
imports.env.memory = new WebAssembly.Memory({ initial: 256, maximum: 256 });
|
||||
}
|
||||
if (!imports.env.table) {
|
||||
imports.env.table = new WebAssembly.Table({ initial: 0, element: 'anyfunc' });
|
||||
imports.env.table = new WebAssembly.Table({ initial: 0, maximum: 0, element: 'anyfunc' });
|
||||
}
|
||||
return new WebAssembly.Instance(module, imports);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user