Commit 39f2bd73 authored by Austin Clements's avatar Austin Clements

runtime: improve initSpan documentation

Change-Id: I9c45aad1c35a99da4c3b8990649dcd962fd23b81
Reviewed-on: https://go-review.googlesource.com/19631Reviewed-by: 's avatarRick Hudson <rlh@golang.org>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent e1024b60
......@@ -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")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment