aboutsummaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/mbitmap.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/runtime/mbitmap.go b/src/runtime/mbitmap.go
index 2d2abca643..fcfcc7261c 100644
--- a/src/runtime/mbitmap.go
+++ b/src/runtime/mbitmap.go
@@ -365,11 +365,13 @@ func heapBitsBulkBarrier(p, size uintptr) {
return
}
+ h := heapBitsForAddr(p)
for i := uintptr(0); i < size; i += ptrSize {
- if heapBitsForAddr(p + i).isPointer() {
+ if h.isPointer() {
x := (*uintptr)(unsafe.Pointer(p + i))
writebarrierptr_nostore(x, *x)
}
+ h = h.next()
}
}