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/mcache.go | |
parent | 3479b065d43f2990ac12e7b00ddff6f63a876ca9 (diff) | |
download | go-e4ac2d4acc8cb44df2107e3fa1067755feaaa005.tar.gz go-e4ac2d4acc8cb44df2107e3fa1067755feaaa005.zip |
[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/mcache.go')
-rw-r--r-- | src/runtime/mcache.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/mcache.go b/src/runtime/mcache.go index 424fa0efac..5938e53ca8 100644 --- a/src/runtime/mcache.go +++ b/src/runtime/mcache.go @@ -109,7 +109,7 @@ func (c *mcache) refill(sizeclass int32) *mspan { // Return the current cached span to the central lists. s := c.alloc[sizeclass] - if uintptr(s.ref) != s.nelems { + if uintptr(s.allocCount) != s.nelems { throw("refill of span with free space remaining") } @@ -123,7 +123,7 @@ func (c *mcache) refill(sizeclass int32) *mspan { throw("out of memory") } - if uintptr(s.ref) == s.nelems { + if uintptr(s.allocCount) == s.nelems { throw("span has no free space") } |