When my script crashes in REPL does GC also crash?

So, I noticed that if my script crashes, and I need to make changes and rerun the script inside the REPL, after some time, julia’s memory usage goes up, and at some point I have to restart the REPL

So, does GC crashes with my script then?

No. Unless it’s actually crashed rather than just an error, which I assume is what you mean.

There are unfreeable memory though, mostly related to modules, types and methods.

So, it must be the unfreeable memory then. I have some types that are fairly large. It seems after some of these interrupted reruns the memory goes up pretty quickly. But with successful reruns, memory tends to be fairly stable. How come the unfreeable memory gets freed then?

Large types shouldn’t be an issue. Large function could be slightly worse but shouldn’t be too bad. As far as unfreeable memory / GC is concerned, error or not shouldn’t make much difference other than following different code paths.

There are many possibilities for error to consume more memory. Most likely is external libraries not freeing up stuff. Impossible to tell without more detail.

I know it’s quite impossible to tell, and that baffles me too.

By external libraries, do you mean the outside packages I import?

Things that you didn’t load/read certainly won’t have an effect on the memory consumption.

I just mean anything that allocate memory that’s not directly managed by julia.