From: Shenghou Ma Date: Mon, 18 Jan 2016 22:55:06 +0000 (-0500) Subject: runtime: print address as hex in messages X-Git-Tag: go1.6rc1~96 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=14aacc2fd8abe054ca7e63a141e87b2844623303;p=gostls13.git runtime: print address as hex in messages Change-Id: I7ccf1b5001d77c4390479f53c0137ab02f98595b Reviewed-on: https://go-review.googlesource.com/18685 Run-TryBot: Minux Ma TryBot-Result: Gobot Gobot Reviewed-by: Ian Lance Taylor --- diff --git a/src/runtime/malloc.go b/src/runtime/malloc.go index d4487eed6d..18001bf85e 100644 --- a/src/runtime/malloc.go +++ b/src/runtime/malloc.go @@ -455,7 +455,7 @@ func (h *mheap) sysAlloc(n uintptr) unsafe.Pointer { } if p < h.arena_start || uintptr(p)+p_size-h.arena_start >= _MaxArena32 { - print("runtime: memory allocated by OS (", p, ") not in usable range [", hex(h.arena_start), ",", hex(h.arena_start+_MaxArena32), ")\n") + print("runtime: memory allocated by OS (", hex(p), ") not in usable range [", hex(h.arena_start), ",", hex(h.arena_start+_MaxArena32), ")\n") sysFree(unsafe.Pointer(p), p_size, &memstats.heap_sys) return nil }