aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2015-11-24 13:52:28 -0500
committerAustin Clements <austin@google.com>2016-01-12 02:00:48 +0000
commit352e287bf72229f274233a34e3382ad28d791d89 (patch)
tree0046e45c3d5d99f21cdfc9e4a1f984bbcd70a74c
parent1abb863d8341b17d7de725436a85198546a9fc01 (diff)
downloadgo-352e287bf72229f274233a34e3382ad28d791d89.tar.gz
go-352e287bf72229f274233a34e3382ad28d791d89.zip
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 <austin@google.com> Reviewed-by: Rick Hudson <rlh@golang.org>
-rw-r--r--src/runtime/mbitmap.go2
1 files changed, 1 insertions, 1 deletions
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)