diff options
| author | Michael Anthony Knyszek <mknyszek@google.com> | 2022-04-01 22:34:45 +0000 |
|---|---|---|
| committer | Michael Knyszek <mknyszek@google.com> | 2022-05-03 15:12:38 +0000 |
| commit | 375d696ddf102d64729a21f931f4e1d8bfa82ce5 (patch) | |
| tree | 7a74ef9c84e95daba67d3a3cc1c6545e46e42a74 /src/runtime/malloc.go | |
| parent | d36d5bd3c1906d3581ac4ac0d8a1a0eb4b5b16c4 (diff) | |
| download | go-375d696ddf102d64729a21f931f4e1d8bfa82ce5.tar.xz | |
runtime: move inconsistent memstats into gcController
Fundamentally, all of these memstats exist to serve the runtime in
managing memory. For the sake of simpler testing, couple these stats
more tightly with the GC.
This CL was mostly done automatically. The fields had to be moved
manually, but the references to the fields were updated via
gofmt -w -r 'memstats.<field> -> gcController.<field>' *.go
For #48409.
Change-Id: Ic036e875c98138d9a11e1c35f8c61b784c376134
Reviewed-on: https://go-review.googlesource.com/c/go/+/397678
Reviewed-by: Michael Pratt <mpratt@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/runtime/malloc.go')
| -rw-r--r-- | src/runtime/malloc.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/malloc.go b/src/runtime/malloc.go index 30a2a5f289..f65be2bc74 100644 --- a/src/runtime/malloc.go +++ b/src/runtime/malloc.go @@ -566,7 +566,7 @@ func (h *mheap) sysAlloc(n uintptr) (v unsafe.Pointer, size uintptr) { // First, try the arena pre-reservation. // Newly-used mappings are considered released. - v = h.arena.alloc(n, heapArenaBytes, &memstats.heapReleased) + v = h.arena.alloc(n, heapArenaBytes, &gcController.heapReleased) if v != nil { size = n goto mapped |
