Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
runtime: runtime.GC() does not trigger GC if GOGC=off #22023
What version of Go are you using (
The work around would be to set GOGC to some number large enough to exhaust the machine's resources. This would have the same impact as GOGC=off.…
On Mon, Sep 25, 2017 at 3:20 PM, GopherBot ***@***.***> wrote: Change https://golang.org/cl/65994 mentions this issue: runtime: make runtime.GC() trigger GC even if GOGC=off — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#22023 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AA7Wn9NG2vx_Y-tMiu2H9oL-VVLjb4gwks5sl_0HgaJpZM4PjLzA> .
…GOGC=off Currently, the priority of checks in (gcTrigger).test() puts the gcpercent<0 test above gcTriggerCycle, which is used for runtime.GC(). This is an unintentional change from 1.8 and before, where runtime.GC() triggered a GC even if GOGC=off. Fix this by rearranging the priority so the gcTriggerCycle test executes even if gcpercent < 0. Fixes #22023. Change-Id: I109328d7b643b6824eb9d79061a9e775f0149575 Reviewed-on: https://go-review.googlesource.com/65994 Run-TryBot: Austin Clements <firstname.lastname@example.org> TryBot-Result: Gobot Gobot <email@example.com> Reviewed-by: Rick Hudson <firstname.lastname@example.org> Reviewed-on: https://go-review.googlesource.com/70979 Run-TryBot: Russ Cox <email@example.com> Reviewed-by: Austin Clements <firstname.lastname@example.org>