]> Cypherpunks repositories - gostls13.git/commit
runtime: mmap(2) on Solaris & Illumos can return EAGAIN.
authorSean Chittenden <seanc@joyent.com>
Sun, 14 May 2017 16:42:35 +0000 (09:42 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 16 May 2017 21:01:42 +0000 (21:01 +0000)
commit13cdd814ea0e8ef165ab54802f9f102b8b690df7
tree99dc8c6734fd725ba155b86711dbf37f9e51ce1b
parent3b263e43a972fdc2877748035197ab42bc44b492
runtime: mmap(2) on Solaris & Illumos can return EAGAIN.

In low memory situations mmap(2) on Illumos[2] can return EAGAIN when it
is unable to reserve the necessary space for the requested mapping.  Go
was not previously handling this correctly for Illumos and would fail to
recognize it was in a low-memory situation, the result being the program
would terminate with a panic instead of running the GC.

Fixes: #14930
[1]: https://www.illumos.org/man/2/mmap

Change-Id: I889cc0547e23f9d6c56e4fdd7bcbd0e15403873a
Reviewed-on: https://go-review.googlesource.com/43461
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/runtime/mem_bsd.go