As from subject, I added conditionals to remove that flag when compiling in FreeBSD.
As far as I know FreeBSD is always working in overcommit mode, so the flag is implicitly always active.
Differential D1594
[BSD] FreeBSD does not have MAP_NORESERVE madpilot on Jul 5 2018, 5:52 PM. Authored by
Details As from subject, I added conditionals to remove that flag when compiling in FreeBSD. As far as I know FreeBSD is always working in overcommit mode, so the flag is implicitly always active. Tested in FreeBSD. Similar patch without conditionals, only removing the MAP_NORESERVE flag committed to the FreeBSD ports tree.
Diff Detail
Event TimelineComment Actions Successful build - Chance fights ever on the side of the prudent. Link to build: https://jenkins.wildfiregames.com/job/differential/674/display/redirect Comment Actions Could be done in source/lib/posix/posix_mman.h maybe. Would save some conditionnals. #ifndef INCLUDED_POSIX_MMAN #define INCLUDED_POSIX_MMAN #if OS_WIN # include "lib/sysdep/os/win/wposix/wmman.h" #else # include <sys/mman.h> #if defined(__FreeBSD__) // FreeBSD doesn't have MAP_NORESERVE. // It is always working in overcommit mode // so the flag is implicitly always active. #define MAP_NORESERVE 0x00 #endif #endif #include "lib/posix/posix_errno.h" // for user convenience #endif // #ifndef INCLUDED_POSIX_MMAN Comment Actions @Stan Your patch looks alright, but this flag seems to refer to reserving swap space, not memory overcommit (which linux also does per default afaik) |