-
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
syscall/js: implement GC of refs #35111
Comments
|
I inserted a debug printing like this: @@ -182,6 +182,7 @@
if (ref === undefined) {
ref = this._values.length;
this._values.push(v);
+ console.log("value", v, "length", this._values.length);
this._refs.set(v, ref);
}
let typeFlag = 0; And it looks like
|
/cc @neelance |
What is 'Backlog'? |
It's a recently introduced new milestone. Read about it in #34376. |
Yeah, it's a known issue and a marked TODO item in wasm_exec.js. From my investigation, it does not appear to be trivial. The stuff at wasm_exec side is simple though. Finalizing the ref from syscall/js side is where the problem lies. Re-titling the issue to reflect that. |
Thanks. I understand GC is a TODO item, but besides, I was wondering what are the accumulated objects every frame (Arguments and objects including them). |
Change https://golang.org/cl/203600 mentions this issue: |
Go 1.13 has memory issue on Wasm (golang/go#35111). Use Go 1.14 instead.
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?
Build this program with
GOOS=js GOARCH=wasm
and see the browser (withwasm_exec.js
and so on). I tested this with Chrome Version 77.0.3865.120 (Official Build) (64-bit)What did you expect to see?
No memory leak
What did you see instead?
The memory usage keeps increasing in the long run.
The memory usage rises and falls in a cycle fashion, but it seems that the peak memory usage keeps increasing.
crbug.com/120186 might be related.
CC @agnivade
The text was updated successfully, but these errors were encountered: