mirror of
https://github.com/golang/go
synced 2024-11-23 23:30:10 -07:00
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 <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
This commit is contained in:
parent
c1296af151
commit
bb7fb8a5fa
@ -72,6 +72,7 @@ func sysMap(v unsafe.Pointer, n uintptr, sysStat *sysMemStat) {
|
||||
throw("runtime: out of memory")
|
||||
}
|
||||
if err != 0 {
|
||||
print("runtime: mprotect(", v, ", ", n, ") returned ", err, "\n")
|
||||
throw("runtime: cannot map pages in arena address space")
|
||||
}
|
||||
}
|
||||
|
@ -73,6 +73,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")
|
||||
}
|
||||
}
|
||||
|
@ -66,6 +66,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")
|
||||
}
|
||||
}
|
||||
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user