]> Cypherpunks repositories - gostls13.git/commit
runtime: document relaxed access to arena_used
authorAustin Clements <austin@google.com>
Fri, 19 Jun 2015 16:29:42 +0000 (12:29 -0400)
committerAustin Clements <austin@google.com>
Mon, 22 Jun 2015 18:37:20 +0000 (18:37 +0000)
commit2a331ca8bbadfa20fc1790b04ff90eec23b156e8
treeb8f7c2a8f73bc055ee8fecd6863ae17271f770b6
parent874a605af0764a8f340c3de65406963f514e21bc
runtime: document relaxed access to arena_used

The unsynchronized accesses to mheap_.arena_used in the concurrent
part of the garbage collector look like a problem waiting to happen.
In fact, they are safe, but the reason is somewhat subtle and
undocumented. This commit documents this reasoning.

Related to issue #9984.

Change-Id: Icdbf2329c1aa11dbe2396a71eb5fc2a85bd4afd5
Reviewed-on: https://go-review.googlesource.com/11254
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
src/runtime/mbarrier.go
src/runtime/mgcmark.go