mirror of
https://github.com/golang/go
synced 2024-11-12 09:50:21 -07:00
runtime: print address as hex in messages
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>
This commit is contained in:
parent
3092a63a64
commit
14aacc2fd8
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user