-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
wasm: program allocs too much memory #35390
Comments
#27462 was fixed for Go1.13 so please try with that version (you are still on 1.12). |
Isn’t this likely a duplicate of #35111 (which is fixed on tip)? |
@ALTree Go1.13 works to this, thank you! |
Nice, I'll close this issue then.
You mean the patch you posted above that you manually applied? I'm not sure, it's likely that it just wasn't enough to fix the issue or possibly you did not build the patched toolchain correctly so it didn't pick up your change. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Hello! I compiled the following program to WASM:
After opening it with my browser (Chrome 78.0.3904.70), take a memory snapshot, that shows it allocs about 1GB memory:
I found a related issue #27462, adjust the preallocated memory to 64MB:
But the allocated memory is still very high (about 780MB):
What did you expect to see?
The allocated memory should approximately be 64MB after adjusting the preallocated memory.
What did you see instead?
The allocated memory is too much higher than expected.
The text was updated successfully, but these errors were encountered: