diff options
author | Michael Anthony Knyszek <mknyszek@google.com> | 2021-03-31 22:06:30 +0000 |
---|---|---|
committer | Michael Knyszek <mknyszek@google.com> | 2021-04-13 22:07:10 +0000 |
commit | 693859542e71fdd9186fff759bf121e9df197fed (patch) | |
tree | 2249cb9dfbc9bdb794bed16a075eb95e0aa37d07 /src/runtime/mgc.go | |
parent | f5f76471074c4f475404fb2488846b38f57f9720 (diff) | |
download | go-693859542e71fdd9186fff759bf121e9df197fed.tar.gz go-693859542e71fdd9186fff759bf121e9df197fed.zip |
runtime: rename gcpercent, readgogc, and heapminimum to match Go style
Generated with:
rf 'mv gcpercent gcPercent'
rf 'mv readgogc readGOGC'
rf 'mv heapminimum heapMinimum'
After this, comments referencing these symbols were updated via a simple
sed command.
For #44167.
Change-Id: I6bb01597c2130686c01f967d0f106b06860ad2db
Reviewed-on: https://go-review.googlesource.com/c/go/+/306597
Trust: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/runtime/mgc.go')
-rw-r--r-- | src/runtime/mgc.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/runtime/mgc.go b/src/runtime/mgc.go index 0c92b2e7b6..8831e27554 100644 --- a/src/runtime/mgc.go +++ b/src/runtime/mgc.go @@ -161,13 +161,13 @@ func gcinit() { memstats.triggerRatio = 7 / 8.0 // Fake a heap_marked value so it looks like a trigger at - // heapminimum is the appropriate growth from heap_marked. + // heapMinimum is the appropriate growth from heap_marked. // This will go into computing the initial GC goal. - memstats.heap_marked = uint64(float64(heapminimum) / (1 + memstats.triggerRatio)) + memstats.heap_marked = uint64(float64(heapMinimum) / (1 + memstats.triggerRatio)) - // Set gcpercent from the environment. This will also compute + // Set gcPercent from the environment. This will also compute // and set the GC trigger and goal. - _ = setGCPercent(readgogc()) + _ = setGCPercent(readGOGC()) work.startSema = 1 work.markDoneSema = 1 @@ -557,7 +557,7 @@ func (t gcTrigger) test() bool { // own write. return memstats.heap_live >= memstats.gc_trigger case gcTriggerTime: - if gcpercent < 0 { + if gcPercent < 0 { return false } lastgc := int64(atomic.Load64(&memstats.last_gc_nanotime)) |