aboutsummaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/traceregion.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/traceregion.go b/src/runtime/traceregion.go
index eb19294f1b..e3a024c458 100644
--- a/src/runtime/traceregion.go
+++ b/src/runtime/traceregion.go
@@ -92,8 +92,8 @@ func (a *traceRegionAlloc) alloc(n uintptr) *notInHeap {
block.off.Store(n)
x = (*notInHeap)(unsafe.Pointer(&block.data[0]))
- // Publish the new block.
- a.current.Store(unsafe.Pointer(block))
+ // Publish the new block. No write barrier as the memory is off heap.
+ a.current.StoreNoWB(unsafe.Pointer(block))
unlock(&a.lock)
})
return x
@@ -112,7 +112,7 @@ func (a *traceRegionAlloc) drop() {
}
if current := a.current.Load(); current != nil {
sysFree(current, unsafe.Sizeof(traceRegionAllocBlock{}), &memstats.other_sys)
- a.current.Store(nil)
+ a.current.StoreNoWB(nil)
}
a.dropping.Store(false)
}