diff options
author | Russ Cox <rsc@golang.org> | 2014-10-06 14:18:56 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2014-10-06 14:18:56 -0400 |
commit | f85d9767d353a27de22f648b7bc6312b040c0c4e (patch) | |
tree | 971e90a40a6077dc8bf67af779094b71beca0e70 /src/runtime/malloc.h | |
parent | d1c93b1e5501a8117a68988334ae450b7d96e49f (diff) | |
parent | c5aca6fedbdd83d9153f6a00dc656aaabb0774c5 (diff) | |
download | go-f85d9767d353a27de22f648b7bc6312b040c0c4e.tar.gz |
[dev.garbage] all: merge default into dev.garbage
This picks up the selectdone dangling pointer fix, among others.
LGTM=rlh
R=rlh
CC=golang-codereviews
https://codereview.appspot.com/153070045
Diffstat (limited to 'src/runtime/malloc.h')
-rw-r--r-- | src/runtime/malloc.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/runtime/malloc.h b/src/runtime/malloc.h index d1930756a..edcd0be77 100644 --- a/src/runtime/malloc.h +++ b/src/runtime/malloc.h @@ -86,6 +86,7 @@ typedef struct MSpan MSpan; typedef struct MStats MStats; typedef struct MLink MLink; typedef struct GCStats GCStats; +typedef struct Workbuf Workbuf; enum { @@ -342,8 +343,11 @@ struct MCache StackFreeList stackcache[NumStackOrders]; SudoG* sudogcache; - - void* gcworkbuf; + // Cached P local buffer holding grey objects (marked by not yet scanned) + // Used by mutator for write barrier work. + // GC uses the mcache of the P it is running on for stack and global scanning + // work as well marking. + Workbuf* gcworkbuf; // Local allocator stats, flushed during GC. uintptr local_nlookup; // number of pointer lookups @@ -355,7 +359,7 @@ struct MCache MSpan* runtime·MCache_Refill(MCache *c, int32 sizeclass); void runtime·MCache_ReleaseAll(MCache *c); void runtime·stackcache_clear(MCache *c); -void runtime·gcworkbuffree(void *b); +void runtime·gcworkbuffree(Workbuf *b); enum { |