From e4ac2d4acc8cb44df2107e3fa1067755feaaa005 Mon Sep 17 00:00:00 2001 From: Rick Hudson Date: Tue, 16 Feb 2016 17:16:43 -0500 Subject: [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 --- src/runtime/mcache.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/runtime/mcache.go') 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") } -- cgit v1.3