rts: Enable two-step allocator on FreeBSD

Authored by bgamari on Jul 6 2018, 10:11 AM.


rts: Enable two-step allocator on FreeBSD

Previously we would prevent any operating system not providing the
from using the two-step allocator. Afterall, Linux will reserve
swap-space for
a mapping unless this flag is given, which is most certainly not what
we want.

However, it seems that FreeBSD provides the reservation-only mapping
that we expect despite not providing the MEM_NORESERVE macro. In fact,
provided the macro until 2014, when it was removed on account of not
implemented in the kernel. However, empirical evidence suggests that
just plain
mmap does what we want.

Reviewers: erikd, simonmar

Subscribers: rwbarton, thomie, erikd, carter

GHC Trac Issues: Trac #15348

Differential Revision: https://phabricator.haskell.org/D4939