diff options
Diffstat (limited to 'src/runtime')
| -rw-r--r-- | src/runtime/mbitmap.go | 4 |
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() } } |
