diff options
| author | Austin Clements <austin@google.com> | 2017-04-21 11:45:44 -0400 |
|---|---|---|
| committer | Austin Clements <austin@google.com> | 2017-04-21 17:41:51 +0000 |
| commit | 9d36163c0b35ddd384534f850fb04170e0d0c7c4 (patch) | |
| tree | 4ad8eb06f8993b0ac6a444f1ca45bcc2fb231380 /src/runtime/debug/garbage.go | |
| parent | 44fe0820c6c304cb56592b07c0d9b2f90c3a20ce (diff) | |
| download | go-9d36163c0b35ddd384534f850fb04170e0d0c7c4.tar.xz | |
runtime: consistently use atomic loads for heap_live
heap_live is updated atomically without locking, so we should also use
atomic loads to read it. Fix the reads of heap_live that happen
outside of STW to be atomic.
Change-Id: Idca9451c348168c2a792a9499af349833a3c333f
Reviewed-on: https://go-review.googlesource.com/41371
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rick Hudson <rlh@golang.org>
Diffstat (limited to 'src/runtime/debug/garbage.go')
0 files changed, 0 insertions, 0 deletions
