From 352e287bf72229f274233a34e3382ad28d791d89 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Tue, 24 Nov 2015 13:52:28 -0500 Subject: [PATCH] runtime: fix incorrect comment 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 Reviewed-by: Rick Hudson --- src/runtime/mbitmap.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/mbitmap.go b/src/runtime/mbitmap.go index 03435a57cb..336d4d8c81 100644 --- a/src/runtime/mbitmap.go +++ b/src/runtime/mbitmap.go @@ -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) -- 2.50.0