()
| 293 | // check for full engine support (use string 'subarray' to avoid closure compiler confusion) |
| 294 | |
| 295 | function initMemory() { |
| 296 | |
| 297 | |
| 298 | |
| 299 | if (Module['wasmMemory']) { |
| 300 | wasmMemory = Module['wasmMemory']; |
| 301 | } else |
| 302 | { |
| 303 | var INITIAL_MEMORY = Module['INITIAL_MEMORY'] || 8388608; |
| 304 | |
| 305 | /** @suppress {checkTypes} */ |
| 306 | wasmMemory = new WebAssembly.Memory({ |
| 307 | 'initial': INITIAL_MEMORY / 65536, |
| 308 | // In theory we should not need to emit the maximum if we want "unlimited" |
| 309 | // or 4GB of memory, but VMs error on that atm, see |
| 310 | // https://github.com/emscripten-core/emscripten/issues/14130 |
| 311 | // And in the pthreads case we definitely need to emit a maximum. So |
| 312 | // always emit one. |
| 313 | 'maximum': 32768, |
| 314 | }); |
| 315 | } |
| 316 | |
| 317 | updateMemoryViews(); |
| 318 | } |
| 319 | |
| 320 | // end include: runtime_init_memory.js |
| 321 |
no test coverage detected