]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: print address as hex in messages
authorShenghou Ma <minux@golang.org>
Mon, 18 Jan 2016 22:55:06 +0000 (17:55 -0500)
committerMinux Ma <minux@golang.org>
Mon, 18 Jan 2016 23:48:06 +0000 (23:48 +0000)
Change-Id: I7ccf1b5001d77c4390479f53c0137ab02f98595b
Reviewed-on: https://go-review.googlesource.com/18685
Run-TryBot: Minux Ma <minux@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/malloc.go

index d4487eed6d01c30b3eae12a4da99740a1535a288..18001bf85ec64c383ebb563795db8ae25907d687 100644 (file)
@@ -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
        }