]> Cypherpunks repositories - gostls13.git/commit
runtime: set sweepgen atomically before updating span state
authorKeith Randall <khr@golang.org>
Thu, 24 Jul 2014 21:37:34 +0000 (14:37 -0700)
committerKeith Randall <khr@golang.org>
Thu, 24 Jul 2014 21:37:34 +0000 (14:37 -0700)
commit3590d9ce695baa7535537e3d1404de52bf94fae5
tree81cda1f2db6e3509fc83a4e9b748cd39953bd1c9
parent748e5db96d8412d2142afb15c9a3da62f410d45a
runtime: set sweepgen atomically before updating span state

Sweepone may be running while a new span is allocating.  It
must not see the state updated while the sweepgen is unset.

Fixes #8399

LGTM=dvyukov
R=golang-codereviews, dvyukov
CC=golang-codereviews
https://golang.org/cl/118050043
src/pkg/runtime/mheap.c