Original post

Context.. I’m coming from the java world where there is a configured max heap size. The garbage collector does all kinds of nifty work to incrementally clean up the heap but when things get tight it relies on that max heap size to know if it should stop the world and clean stuff up.

In go there doesn’t seem to be a max heap size (although googling around I see a lot of references to maybe adding one in the future) … but lets say my application has its memory constrained by something like cgroups — how will the go gc recognize that things are bumping up against the cgroup limit, the incremental efforts aren’t enough and it needs to stop the world and clean things up? or does it?