aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/mheap.go
diff options
context:
space:
mode:
authorRick Hudson <rlh@golang.org>2016-07-19 14:21:23 -0400
committerRick Hudson <rlh@golang.org>2017-05-25 18:05:53 +0000
commit1d4942afe0872e5f6d95cfa0a5751ef4a9dde114 (patch)
treee3eca264c83e28557f626bc4bf619f516a9e56df /src/runtime/mheap.go
parent8b25a00e6d889c8a919922f747791478c8bdfe6f (diff)
downloadgo-1d4942afe0872e5f6d95cfa0a5751ef4a9dde114.tar.gz
go-1d4942afe0872e5f6d95cfa0a5751ef4a9dde114.zip
[dev.garbage] runtime: determine if an object is publicdev.garbage
ROC (request oriented collector) needs to determine if an object is visible to other goroutines, i.e. public. In a later CL this will be used by the write barrier and the publishing logic to distinguish between local and public objects and act accordingly. Change-Id: I6a80da9deb21f57e831a2ec04e41477f997a8c33 Reviewed-on: https://go-review.googlesource.com/25056 Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/mheap.go')
-rw-r--r--src/runtime/mheap.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/runtime/mheap.go b/src/runtime/mheap.go
index 4cf08e46a7..09dc0d51ad 100644
--- a/src/runtime/mheap.go
+++ b/src/runtime/mheap.go
@@ -195,6 +195,13 @@ type mspan struct {
// helps performance.
nelems uintptr // number of object in the span.
+ // startindex is the object index where the owner G started allocating in this span.
+ //
+ // This is used in conjunction with nextUsedSpan to implement ROC checkpoints and recycles.
+ startindex uintptr
+ // nextUsedSpan links together all spans that have the same span class and owner G.
+ nextUsedSpan *mspan
+
// Cache of the allocBits at freeindex. allocCache is shifted
// such that the lowest bit corresponds to the bit freeindex.
// allocCache holds the complement of allocBits, thus allowing