rts: Enable two-step allocator on FreeBSD

Authored by bgamari on Jul 5 2018, 9:32 PM.



Previously we would prevent any operating system not providing the MEM_NORESERVE flag
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 behavior
that we expect despite not providing the MEM_NORESERVE macro. In fact, it
provided the macro until 2014, when it was removed on account of not being
implemented in the kernel. However, empirical evidence suggests that just plain
mmap does what we want.

Diff Detail

rGHC Glasgow Haskell Compiler
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
bgamari created this revision.Jul 5 2018, 9:32 PM
bgamari updated this revision to Diff 17215.Jul 6 2018, 10:16 AM


This revision was not accepted when it landed; it landed in state Needs Review.Jul 6 2018, 1:35 PM
This revision was automatically updated to reflect the committed changes.