aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/mfinal.go
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2015-10-26 17:53:22 -0700
committerMatthew Dempsky <mdempsky@google.com>2015-10-27 02:53:04 +0000
commit4ff231bca1f9602e810b95cb75d7997329009e31 (patch)
tree59a5c665afe1c635d2e2e425af94b701e529cc8a /src/runtime/mfinal.go
parent53d43cb5565ec4ba77180d8cd53701e3d75c490b (diff)
downloadgo-4ff231bca1f9602e810b95cb75d7997329009e31.tar.gz
go-4ff231bca1f9602e810b95cb75d7997329009e31.zip
runtime: eliminate some unnecessary uintptr conversions
arena_{start,used,end} are already uintptr, so no need to convert them to uintptr, much less to convert them to unsafe.Pointer and then to uintptr. No binary change to pkg/linux_amd64/runtime.a. Change-Id: Ia4232ed2a724c44fde7eba403c5fe8e6dccaa879 Reviewed-on: https://go-review.googlesource.com/16339 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/runtime/mfinal.go')
-rw-r--r--src/runtime/mfinal.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/mfinal.go b/src/runtime/mfinal.go
index d6a8da9619..92b3cf523c 100644
--- a/src/runtime/mfinal.go
+++ b/src/runtime/mfinal.go
@@ -384,8 +384,8 @@ func findObject(v unsafe.Pointer) (s *mspan, x unsafe.Pointer, n uintptr) {
}
// find span
- arena_start := uintptr(unsafe.Pointer(mheap_.arena_start))
- arena_used := uintptr(unsafe.Pointer(mheap_.arena_used))
+ arena_start := mheap_.arena_start
+ arena_used := mheap_.arena_used
if uintptr(v) < arena_start || uintptr(v) >= arena_used {
return
}