()
| 12 | // check for full engine support (use string 'subarray' to avoid closure compiler confusion) |
| 13 | |
| 14 | function initMemory() { |
| 15 | #if WASM_ESM_INTEGRATION && PTHREADS |
| 16 | if (ENVIRONMENT_IS_PTHREAD) { |
| 17 | wasmMemory = globalThis.wasmMemory; |
| 18 | assert(wasmMemory); |
| 19 | updateMemoryViews(); |
| 20 | } |
| 21 | #endif |
| 22 | |
| 23 | {{{ runIfWorkerThread('return') }}} |
| 24 | |
| 25 | #if expectToReceiveOnModule('wasmMemory') |
| 26 | if (Module['wasmMemory']) { |
| 27 | wasmMemory = Module['wasmMemory']; |
| 28 | } else |
| 29 | #endif |
| 30 | { |
| 31 | var INITIAL_MEMORY = {{{ makeModuleReceiveExpr('INITIAL_MEMORY', INITIAL_MEMORY) }}}; |
| 32 | |
| 33 | #if ASSERTIONS |
| 34 | assert(INITIAL_MEMORY >= {{{ STACK_SIZE }}}, `INITIAL_MEMORY should be larger than STACK_SIZE, was ${INITIAL_MEMORY}! (STACK_SIZE={{{ STACK_SIZE }}})`); |
no test coverage detected