summaryrefslogtreecommitdiff
path: root/libgo/go/runtime/mcache.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/runtime/mcache.go')
-rw-r--r--libgo/go/runtime/mcache.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/libgo/go/runtime/mcache.go b/libgo/go/runtime/mcache.go
index 27328e1e31e..ba526247217 100644
--- a/libgo/go/runtime/mcache.go
+++ b/libgo/go/runtime/mcache.go
@@ -123,7 +123,11 @@ func (c *mcache) refill(spc spanClass) {
if s.sweepgen != mheap_.sweepgen+3 {
throw("bad sweepgen in refill")
}
- atomic.Store(&s.sweepgen, mheap_.sweepgen)
+ if go115NewMCentralImpl {
+ mheap_.central[spc].mcentral.uncacheSpan(s)
+ } else {
+ atomic.Store(&s.sweepgen, mheap_.sweepgen)
+ }
}
// Get a new cached span from the central lists.