diff options
| author | Rick Hudson <rlh@golang.org> | 2016-02-16 17:16:43 -0500 |
|---|---|---|
| committer | Rick Hudson <rlh@golang.org> | 2016-04-27 21:54:49 +0000 |
| commit | e4ac2d4acc8cb44df2107e3fa1067755feaaa005 (patch) | |
| tree | 7c21e754aa738aa5cc297bdf98b7828498ddb0d3 /src/runtime/mstats.go | |
| parent | 3479b065d43f2990ac12e7b00ddff6f63a876ca9 (diff) | |
| download | go-e4ac2d4acc8cb44df2107e3fa1067755feaaa005.tar.xz | |
[dev.garbage] runtime: replace ref with allocCount
This is a renaming of the field ref to the
more appropriate allocCount. The field
holds the number of objects in the span
that are currently allocated. Some throws
strings were adjusted to more accurately
convey the meaning of allocCount.
Change-Id: I10daf44e3e9cc24a10912638c7de3c1984ef8efe
Reviewed-on: https://go-review.googlesource.com/19518
Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/mstats.go')
| -rw-r--r-- | src/runtime/mstats.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/mstats.go b/src/runtime/mstats.go index 84a79e312c..2d75d2fef1 100644 --- a/src/runtime/mstats.go +++ b/src/runtime/mstats.go @@ -295,9 +295,9 @@ func updatememstats(stats *gcstats) { memstats.nmalloc++ memstats.alloc += uint64(s.elemsize) } else { - memstats.nmalloc += uint64(s.ref) - memstats.by_size[s.sizeclass].nmalloc += uint64(s.ref) - memstats.alloc += uint64(s.ref) * uint64(s.elemsize) + memstats.nmalloc += uint64(s.allocCount) + memstats.by_size[s.sizeclass].nmalloc += uint64(s.allocCount) + memstats.alloc += uint64(s.allocCount) * uint64(s.elemsize) } } unlock(&mheap_.lock) |
