]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix incorrect comment
authorAustin Clements <austin@google.com>
Tue, 24 Nov 2015 18:52:28 +0000 (13:52 -0500)
committerAustin Clements <austin@google.com>
Tue, 12 Jan 2016 02:00:48 +0000 (02:00 +0000)
This comment is probably a hold-over from when the heap bitmap was
interleaved and the shift was 0, 2, 4, or 6. Now the shift is 0, 1, 2,
or 3.

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

index 03435a57cb512167cc584d8688baa7ce32161638..336d4d8c811c8ad6a5ffaff1e078a25aebd2bb57 100644 (file)
@@ -333,7 +333,7 @@ func (h heapBits) hasPointers(size uintptr) bool {
                return true
        }
        // Otherwise, at least a 2-word object, and at least 2-word aligned,
-       // so h.shift is either 0 or 4, so we know we can get the bits for the
+       // so h.shift is either 0 or 2, so we know we can get the bits for the
        // first two words out of *h.bitp.
        // If either of the first two words is a pointer, not pointer free.
        b := uint32(*h.bitp >> h.shift)