diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/shell_sharedlib.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/shell_sharedlib.js b/src/shell_sharedlib.js index a2956c24..e57918ea 100644 --- a/src/shell_sharedlib.js +++ b/src/shell_sharedlib.js @@ -6,6 +6,13 @@ Module.print = parentModule.print; Module.printErr = parentModule.printErr; +#if ASM_JS + // Each module has its own stack + var STACKTOP = parentModule['_malloc'](TOTAL_STACK); + assert(STACKTOP % 8 == 0); + var STACK_MAX = STACKTOP + TOTAL_STACK; +#endif + {{BODY}} // {{MODULE_ADDITIONS}} |