]> Cypherpunks repositories - gostls13.git/commit
runtime: Adjust when write barriers are active
authorRick Hudson <rlh@golang.org>
Thu, 5 Mar 2015 22:33:08 +0000 (17:33 -0500)
committerRick Hudson <rlh@golang.org>
Tue, 10 Mar 2015 15:04:12 +0000 (15:04 +0000)
commitd0eab030913e067012714d72811d959ce849e7a2
treebe7db9fd1ec09257a3e56ef1e59ad60ff96b03ca
parent919fd24884df1873755e4837f400372ce71b160b
runtime: Adjust when write barriers are active

Even though the world is stopped the GC may do pointer
writes that need to be protected by write barriers.
This means that the write barrier must be on
continuously from the time the mark phase starts and
the mark termination phase ends. Checks were added to
ensure that no allocation happens during a GC.

Hoist the logic that clears pools the start of the GC
so that the memory can be reclaimed during this GC cycle.

Change-Id: I9d1551ac5db9bac7bac0cb5370d5b2b19a9e6a52
Reviewed-on: https://go-review.googlesource.com/6990
Reviewed-by: Austin Clements <austin@google.com>
src/runtime/malloc.go
src/runtime/mgc.go