aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/mfinal.go
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2016-04-28 10:59:00 -0400
committerAustin Clements <austin@google.com>2016-04-29 03:53:14 +0000
commitb7adc41fbacac446c1daf0cb282cb2a921d4a15b (patch)
tree119544779047b45d98afae79361295a2f0608c11 /src/runtime/mfinal.go
parent2e8b74b69574e969b5565e69cb54d39064b2dba1 (diff)
downloadgo-b7adc41fbacac446c1daf0cb282cb2a921d4a15b.tar.gz
go-b7adc41fbacac446c1daf0cb282cb2a921d4a15b.zip
[dev.garbage] runtime: use s.base() everywhere it makes sense
Currently we have lots of (s.start << _PageShift) and variants. We now have an s.base() function that returns this. It's faster and more readable, so use it. Change-Id: I888060a9dae15ea75ca8cc1c2b31c905e71b452b Reviewed-on: https://go-review.googlesource.com/22559 Reviewed-by: Rick Hudson <rlh@golang.org> Run-TryBot: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/mfinal.go')
-rw-r--r--src/runtime/mfinal.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/mfinal.go b/src/runtime/mfinal.go
index e81650d842..6dce6d7501 100644
--- a/src/runtime/mfinal.go
+++ b/src/runtime/mfinal.go
@@ -402,7 +402,7 @@ func findObject(v unsafe.Pointer) (s *mspan, x unsafe.Pointer, n uintptr) {
if s == nil {
return
}
- x = unsafe.Pointer(uintptr(s.start) << pageShift)
+ x = unsafe.Pointer(s.base())
if uintptr(v) < uintptr(x) || uintptr(v) >= uintptr(unsafe.Pointer(s.limit)) || s.state != mSpanInUse {
s = nil