Skip to content
  • Ben Gamari's avatar
    rts: Enable two-step allocator on FreeBSD · 87367158
    Ben Gamari authored and Ben Gamari's avatar Ben Gamari committed
    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.
    
    Reviewers: erikd, simonmar
    
    Subscribers: rwbarton, thomie, erikd, carter
    
    GHC Trac Issues: #15348
    
    Differential Revision: https://phabricator.haskell.org/D4939
    87367158