aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-02-19 15:45:18 +0100
committerSverker Eriksson <[email protected]>2016-02-23 12:14:05 +0100
commitabe5967c1964a4ca93f321c6cd564c8650f11a53 (patch)
tree2bff57dcbc4ae2f370e847b0e72953657f419e35 /erts
parentdb241c69cef8774b9b7afa7e0f0f8dbdcf528a07 (diff)
downloadotp-abe5967c1964a4ca93f321c6cd564c8650f11a53.tar.gz
otp-abe5967c1964a4ca93f321c6cd564c8650f11a53.tar.bz2
otp-abe5967c1964a4ca93f321c6cd564c8650f11a53.zip
erts: Refactor init of erts_literal_mmapper
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/beam/erl_alloc.c3
-rw-r--r--erts/emulator/sys/common/erl_mseg.c3
2 files changed, 3 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_alloc.c b/erts/emulator/beam/erl_alloc.c
index 14ff13fdb2..7c880342bd 100644
--- a/erts/emulator/beam/erl_alloc.c
+++ b/erts/emulator/beam/erl_alloc.c
@@ -774,9 +774,6 @@ erts_alloc_init(int *argc, char **argv, ErtsAllocInitOpts *eaiop)
#if HAVE_ERTS_MSEG
init.mseg.nos = erts_no_schedulers;
erts_mseg_init(&init.mseg);
-# if defined(ARCH_64) && defined(ERTS_HAVE_OS_PHYSICAL_MEMORY_RESERVATION)
- erts_mmap_init(&erts_literal_mmapper, &init.mseg.literal_mmap);
-# endif
#endif
erts_alcu_init(&init.alloc_util);
diff --git a/erts/emulator/sys/common/erl_mseg.c b/erts/emulator/sys/common/erl_mseg.c
index 20695899eb..2f2d7a5dd8 100644
--- a/erts/emulator/sys/common/erl_mseg.c
+++ b/erts/emulator/sys/common/erl_mseg.c
@@ -1403,6 +1403,9 @@ erts_mseg_init(ErtsMsegInit_t *init)
erts_mtx_init(&init_atoms_mutex, "mseg_init_atoms");
erts_mmap_init(&erts_dflt_mmapper, &init->dflt_mmap);
+#if defined(ARCH_64) && defined(ERTS_HAVE_OS_PHYSICAL_MEMORY_RESERVATION)
+ erts_mmap_init(&erts_literal_mmapper, &init->literal_mmap);
+#endif
if (!IS_2POW(GET_PAGE_SIZE))
erl_exit(ERTS_ABORT_EXIT, "erts_mseg: Unexpected page_size %beu\n", GET_PAGE_SIZE);