From bb7fb8a5fac1ad9570c554c366826d649350acbe Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 18 Jan 2022 19:44:34 -0800 Subject: runtime: print error if mmap fails Fixes #49687 Change-Id: Ife7f64f4c98449eaff7327e09bc1fb67acee72c9 Reviewed-on: https://go-review.googlesource.com/c/go/+/379354 Trust: Ian Lance Taylor Run-TryBot: Ian Lance Taylor TryBot-Result: Gopher Robot Reviewed-by: Austin Clements --- src/runtime/mem_linux.go | 1 + 1 file changed, 1 insertion(+) (limited to 'src/runtime/mem_linux.go') diff --git a/src/runtime/mem_linux.go b/src/runtime/mem_linux.go index f8f9c53170..f8333014c2 100644 --- a/src/runtime/mem_linux.go +++ b/src/runtime/mem_linux.go @@ -189,6 +189,7 @@ func sysMap(v unsafe.Pointer, n uintptr, sysStat *sysMemStat) { throw("runtime: out of memory") } if p != v || err != 0 { + print("runtime: mmap(", v, ", ", n, ") returned ", p, ", ", err, "\n") throw("runtime: cannot map pages in arena address space") } } -- cgit v1.3