]> Cypherpunks repositories - gostls13.git/commit
runtime: fix heapBitsSweepSpan comment
authorAustin Clements <austin@google.com>
Tue, 9 Feb 2016 22:24:26 +0000 (17:24 -0500)
committerAustin Clements <austin@google.com>
Thu, 25 Feb 2016 23:37:09 +0000 (23:37 +0000)
commite1024b6030e181f3994d93cac6099d3d0f341260
tree6fc33244518fcec07766a6a85fafc2e930fee828
parentca42f1f50e4cc26b896275673218d7376fab501d
runtime: fix heapBitsSweepSpan comment

Currently the heapBitsSweepSpan comment claims that heapBitsSweepSpan
sets the heap bitmap for the first two words to dead. In fact, it sets
the first *four* words to scalar/dead. This is important because first
two words don't actually have a dead bit, so for objects larger than
two words it *must* set a dead bit in third word to reset the object
to a "noscan" state. For example, we use this in heapBits.hasPointers
to detect that an object larger than two words is noscan.

Change-Id: Ie166a628bed5060851db083475c7377adb349d6c
Reviewed-on: https://go-review.googlesource.com/19630
Reviewed-by: Rick Hudson <rlh@golang.org>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/runtime/mbitmap.go