mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: convert gcController.maxStackScan to atomic type
For #53821. Change-Id: I1bd23cdbc371011ec2331fb0a37482ecf99a063b Reviewed-on: https://go-review.googlesource.com/c/go/+/417778 Run-TryBot: Michael Pratt <mpratt@google.com> Reviewed-by: Austin Clements <austin@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
parent
e1b0da6144
commit
02fb9b8ca9
4 changed files with 6 additions and 9 deletions
|
|
@ -1322,7 +1322,7 @@ func (c *GCController) StartCycle(stackSize, globalsSize uint64, scannableFrac f
|
|||
if c.heapMarked > trigger {
|
||||
trigger = c.heapMarked
|
||||
}
|
||||
c.maxStackScan = stackSize
|
||||
c.maxStackScan.Store(stackSize)
|
||||
c.globalsScan = globalsSize
|
||||
c.heapLive.Store(trigger)
|
||||
c.heapScan.Add(int64(float64(trigger-c.heapMarked) * scannableFrac))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue