Skip to content

rts: Fallback to mmap when vm_allocate fails for Darwin 10 and later (fix #21049)

Torrekie Gen requested to merge Torrekie/ghc:master into master

This MR modified the logic of my_mmap() under rts/posix/OSMem.c to allow newer Mac OS X/macOS to use mmap(2) to perform allocations when vm_allocate fails, this also prevented the program from aborting itself when vm_allocate fails, to match the behavior where mmap method fails (which was returning NULL).

This fixes haskell/ghcup-hs#384 and #21049

Merge request reports