• Austin Clements's avatar
    runtime: fix heapBitsSweepSpan comment · e1024b60
    Austin Clements authored
    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/19630Reviewed-by: 's avatarRick Hudson <rlh@golang.org>
    Run-TryBot: Austin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    e1024b60
mbitmap.go 57.2 KB