Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to asynchronously prepare wasm: memory import has larger maximum #5069

Closed
PetterS opened this issue Mar 23, 2017 · 2 comments
Closed
Labels

Comments

@PetterS
Copy link

PetterS commented Mar 23, 2017

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.

@kripken
Copy link
Member

kripken commented Mar 23, 2017

Yeah, thanks, in wasm the max memory size is baked into the wasm binary. We should improve the error message there, I opened #5073

@stale
Copy link

stale bot commented Aug 30, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants