rts/posix: Ensure that memory commit succeeds
authorBen Gamari <bgamari.foss@gmail.com>
Mon, 16 Oct 2017 21:30:12 +0000 (17:30 -0400)
committerBen Gamari <ben@smart-cactus.org>
Mon, 16 Oct 2017 21:30:14 +0000 (17:30 -0400)
commita69fa5441c944d7f74c76bdae9f3dd198007ee42
treebb4c7ab2237ccdeae2d971e52d16b0999dd6a06c
parentc5da84db217735ccce47c2350a6917ee9ac00927
rts/posix: Ensure that memory commit succeeds

Previously we wouldn't check that mmap would succeed. I suspect this may
have been the cause of #14329.

Test Plan: Validate under low-memory condition

Reviewers: simonmar, austin, erikd

Reviewed By: simonmar

Subscribers: rwbarton, thomie

GHC Trac Issues: #14329

Differential Revision: https://phabricator.haskell.org/D4075
rts/posix/OSMem.c