diff --git a/src/runtime/mbitmap.go b/src/runtime/mbitmap.go index 35fc82bf4a..04992890a1 100644 --- a/src/runtime/mbitmap.go +++ b/src/runtime/mbitmap.go @@ -494,6 +494,10 @@ func typeBitsBulkBarrier(typ *_type, p, size uintptr) { // TODO(rsc): Perhaps introduce a different heapBitsSpan type. // initSpan initializes the heap bitmap for a span. +// It clears all mark and checkmark bits. +// If this is a span of pointer-sized objects, it initializes all +// words to pointer (and there are no dead bits). +// Otherwise, it initializes all words to scalar/dead. func (h heapBits) initSpan(size, n, total uintptr) { if total%heapBitmapScale != 0 { throw("initSpan: unaligned length")