runtime: add a non-functional memory limit to the pacer

Nothing much to see here, just some plumbing to make latter CLs smaller
and clearer.

For #48409.

Change-Id: Ide23812d5553e0b6eea5616c277d1a760afb4ed0
Reviewed-on: https://go-review.googlesource.com/c/go/+/393401
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
This commit is contained in:
Michael Anthony Knyszek 2022-03-02 20:49:36 +00:00 committed by Michael Knyszek
parent 0feebe6eb5
commit 986a31053d
4 changed files with 69 additions and 10 deletions

View file

@ -1263,7 +1263,7 @@ func NewGCController(gcPercent int) *GCController {
// space.
g := Escape(new(GCController))
g.gcControllerState.test = true // Mark it as a test copy.
g.init(int32(gcPercent))
g.init(int32(gcPercent), maxInt64)
return g
}