You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reproduction
Enter the Koka repl and load some program, like :l samples/all.kk.
Run :r a few times.
Notice the memory usage of the koka process increases with about 50MB each time.
This can get out of hand quite a bit when programming with a repl open for the recompile+test cycle.
Workaround
Exit and restart the repl.
The text was updated successfully, but these errors were encountered:
This is a known issue. It also happens with the language server / vscode extension. I'm pretty sure it has to do with Haskell's laziness. I'd love to figure this out, and I've done some work in trying to figure it out, but haven't ever completely solved the memory leak. Do you have any experience debugging Haskell memory leaks?
No, unfortunately I have very little experience in using Haskell beyond small toy projects. But I have heard many times people complaining about these bugs being hard to track down. I once saw a talk where someone made a compelling point about the StrictData language extension being very helpful in avoiding accidental memory leaks. But that only works for your own types, the types from libraries (including prelude) keep their own laziness semantics.
Yes -- there is some kind of space leak... I think it is a laziness issue but haven't been able to find it (yet)... I think it has to do with the modules hanging on to some intermediate (maybe unevaluated) parts... but not sure. We need to bootstrap Koka in Koka some day :-D ... garbage free!
Reproduction
Enter the Koka repl and load some program, like
:l samples/all.kk
.Run
:r
a few times.Notice the memory usage of the koka process increases with about 50MB each time.
This can get out of hand quite a bit when programming with a repl open for the recompile+test cycle.
Workaround
Exit and restart the repl.
The text was updated successfully, but these errors were encountered: