Run GC if we hit the memory limit, and only restart if we are still too big.