aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys/common/erl_mseg.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-04-20 16:10:37 +0200
committerSverker Eriksson <[email protected]>2016-04-20 16:10:37 +0200
commit42a1166b47721cd444dbe8c70a04125d842a27c9 (patch)
tree274cad0504b7b03750fea93ea9b03bf60eed0a63 /erts/emulator/sys/common/erl_mseg.c
parentaee7c8eec5219cd1b29db34748d2b2a60701a0c3 (diff)
parentb3c7a581070180750a368ddf3bd55db1bafc11ea (diff)
downloadotp-42a1166b47721cd444dbe8c70a04125d842a27c9.tar.gz
otp-42a1166b47721cd444dbe8c70a04125d842a27c9.tar.bz2
otp-42a1166b47721cd444dbe8c70a04125d842a27c9.zip
Merge branch 'sverker/hipe-code-alloc'
Diffstat (limited to 'erts/emulator/sys/common/erl_mseg.c')
-rw-r--r--erts/emulator/sys/common/erl_mseg.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/erts/emulator/sys/common/erl_mseg.c b/erts/emulator/sys/common/erl_mseg.c
index c8b72c6e77..43e75e2573 100644
--- a/erts/emulator/sys/common/erl_mseg.c
+++ b/erts/emulator/sys/common/erl_mseg.c
@@ -31,6 +31,7 @@
# include "config.h"
#endif
+#define ERTS_WANT_MEM_MAPPERS
#include "sys.h"
#include "erl_mseg.h"
#include "global.h"
@@ -1402,9 +1403,15 @@ erts_mseg_init(ErtsMsegInit_t *init)
erts_mtx_init(&init_atoms_mutex, "mseg_init_atoms");
- erts_mmap_init(&erts_dflt_mmapper, &init->dflt_mmap);
+#ifdef ERTS_ALC_A_EXEC
+ /* Initialize erts_exec_mapper *FIRST*, to increase probability
+ * of getting low memory for HiPE AMD64's small code model.
+ */
+ erts_mmap_init(&erts_exec_mmapper, &init->exec_mmap, 1);
+#endif
+ erts_mmap_init(&erts_dflt_mmapper, &init->dflt_mmap, 0);
#if defined(ARCH_64) && defined(ERTS_HAVE_OS_PHYSICAL_MEMORY_RESERVATION)
- erts_mmap_init(&erts_literal_mmapper, &init->literal_mmap);
+ erts_mmap_init(&erts_literal_mmapper, &init->literal_mmap, 0);
#endif
if (!IS_2POW(GET_PAGE_SIZE))