aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys/common
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-10-21 16:42:30 +0200
committerSverker Eriksson <[email protected]>2016-10-21 16:42:30 +0200
commit79abd75445dec4f1932868fcc52238a84d94cce0 (patch)
tree7cdb0ae5727da8f8f7b6bba32e748560187cfef3 /erts/emulator/sys/common
parenta7ec329873625dada8defa5d4db06d96cf421a97 (diff)
downloadotp-79abd75445dec4f1932868fcc52238a84d94cce0.tar.gz
otp-79abd75445dec4f1932868fcc52238a84d94cce0.tar.bz2
otp-79abd75445dec4f1932868fcc52238a84d94cce0.zip
erts: Use mprotect for hipe on all arch except x86_64
Only x86_64 needs to reserve low virtual memory for its amd64 small code model.
Diffstat (limited to 'erts/emulator/sys/common')
-rw-r--r--erts/emulator/sys/common/erl_mmap.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/erts/emulator/sys/common/erl_mmap.h b/erts/emulator/sys/common/erl_mmap.h
index 92e9eb9e41..1049f7affc 100644
--- a/erts/emulator/sys/common/erl_mmap.h
+++ b/erts/emulator/sys/common/erl_mmap.h
@@ -157,13 +157,23 @@ Eterm erts_mmap_info_options(ErtsMemMapper*,
# include "erl_alloc_types.h"
extern ErtsMemMapper erts_dflt_mmapper;
-# if defined(ARCH_64) && defined(ERTS_HAVE_OS_PHYSICAL_MEMORY_RESERVATION)
+
+# if defined(ERTS_HAVE_OS_PHYSICAL_MEMORY_RESERVATION)
+
+# if defined(ARCH_64)
extern ErtsMemMapper erts_literal_mmapper;
-# ifdef ERTS_ALC_A_EXEC
-# define ERTS_HAVE_EXEC_MMAPPER
+# endif
+
+# if defined(ERTS_ALC_A_EXEC) && defined(__x86_64__)
+ /*
+ * On x86_64, exec_alloc employs its own super carrier 'erts_exec_mmaper'
+ * to ensure low memory for HiPE AMD64 small code model.
+ */
+# define ERTS_HAVE_EXEC_MMAPPER
extern ErtsMemMapper erts_exec_mmapper;
-# endif
# endif
+
+# endif /* ERTS_HAVE_OS_PHYSICAL_MEMORY_RESERVATION */
#endif /* ERTS_WANT_MEM_MAPPERS */
/*#define HARD_DEBUG_MSEG*/