I have compiled my wasm with the incoming branch and I have not set TOTAL_MEMORY (so the default is 16MB, I guess).
Loading my wasm works nicely in Chrome and Firefox. However, for large programs I get the familiar "Cannot enlarge memory arrays." error message. With Javascript, I fix this my adding total memory to my module:
var Module = {
...
TOTAL_MEMORY: 200 * 1024 * 1024,
But when using wasm I get the following error message:
failed to asynchronously prepare wasm: LinkError: WebAssembly.instantiate(): memory import 47 has larger maximum than maximum 256, got 3200
So I cannot set Module.TOTAL_MEMORY when using wasm, even though the error message after "Cannot enlarge memory arrays." suggests that as an option.
Yeah, thanks, in wasm the max memory size is baked into the wasm binary. We should improve the error message there, I opened #5073
This issue has been automatically marked as stale because there has been no activity in the past 2 years. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant.
Most helpful comment
Yeah, thanks, in wasm the max memory size is baked into the wasm binary. We should improve the error message there, I opened #5073