aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/mstats.go
diff options
context:
space:
mode:
authorRick Hudson <rlh@golang.org>2016-02-16 17:16:43 -0500
committerRick Hudson <rlh@golang.org>2016-04-27 21:54:49 +0000
commite4ac2d4acc8cb44df2107e3fa1067755feaaa005 (patch)
tree7c21e754aa738aa5cc297bdf98b7828498ddb0d3 /src/runtime/mstats.go
parent3479b065d43f2990ac12e7b00ddff6f63a876ca9 (diff)
downloadgo-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.go6
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)