aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys/common/erl_mmap.h
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-06-15 17:28:02 +0200
committerSverker Eriksson <[email protected]>2016-06-15 17:28:02 +0200
commit7bfb67a155f2adbb94df0d6a2e966c84951cd04a (patch)
treeff686d78c8b9cd4f2596c93a72481faf1ebb63c2 /erts/emulator/sys/common/erl_mmap.h
parente3a07b08709bd7eacae0bcb0353c347475134ad7 (diff)
parent6c5277b154316137ebc9f83ed8566357ffebd3e0 (diff)
downloadotp-7bfb67a155f2adbb94df0d6a2e966c84951cd04a.tar.gz
otp-7bfb67a155f2adbb94df0d6a2e966c84951cd04a.tar.bz2
otp-7bfb67a155f2adbb94df0d6a2e966c84951cd04a.zip
Merge branch 'jj1bdx-19.0-rc2-hipemmap/PR-1094'
Diffstat (limited to 'erts/emulator/sys/common/erl_mmap.h')
-rw-r--r--erts/emulator/sys/common/erl_mmap.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/erts/emulator/sys/common/erl_mmap.h b/erts/emulator/sys/common/erl_mmap.h
index 7ac61a82c1..fa51b663fa 100644
--- a/erts/emulator/sys/common/erl_mmap.h
+++ b/erts/emulator/sys/common/erl_mmap.h
@@ -38,7 +38,17 @@
# if HAVE_MREMAP
# define ERTS_HAVE_OS_MREMAP 1
# endif
-# if defined(MAP_FIXED) && defined(MAP_NORESERVE)
+/*
+ * MAP_NORESERVE is undefined in FreeBSD 10.x and later.
+ * This is to enable 64bit HiPE experimentally on FreeBSD.
+ * Note that on FreeBSD MAP_NORESERVE was "never implemented"
+ * even before 11.x (and the flag does not exist in /usr/src/sys/vm/mmap.c
+ * of 10.3-STABLE r301478 either), and HiPE was working on OTP 18.3.3,
+ * so mandating MAP_NORESERVE on FreeBSD might not be needed.
+ * See the following message on how MAP_NORESERVE was treated on FreeBSD:
+ * <http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20150202/122958.html>
+ */
+# if defined(MAP_FIXED) && (defined(MAP_NORESERVE) || defined(__FreeBSD__))
# define ERTS_HAVE_OS_PHYSICAL_MEMORY_RESERVATION 1
# endif
#endif