aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-03-08 19:31:41 +0100
committerSverker Eriksson <[email protected]>2016-03-08 19:31:41 +0100
commit5750206a0dc33e13913efef73e171e121c082635 (patch)
treed55ec7efb50e088e4a0719e8b904f756fd71b124 /erts/emulator/sys
parentc785c540b41db4e2676c0dd462971590779761cf (diff)
parent8e2a21f1df1140867d0b074ec7a86610d1e1b51e (diff)
downloadotp-5750206a0dc33e13913efef73e171e121c082635.tar.gz
otp-5750206a0dc33e13913efef73e171e121c082635.tar.bz2
otp-5750206a0dc33e13913efef73e171e121c082635.zip
Merge branch 'sverk/literal-alloc-polish'
* sverk/literal-alloc-polish: erts: Add emulator flag +MIscs for literal super carrier size erts: Refactor init of erts_literal_mmapper erts: Make literal_alloc documented and configurable
Diffstat (limited to 'erts/emulator/sys')
-rw-r--r--erts/emulator/sys/common/erl_mmap.h4
-rw-r--r--erts/emulator/sys/common/erl_mseg.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/erts/emulator/sys/common/erl_mmap.h b/erts/emulator/sys/common/erl_mmap.h
index 61d912fd28..67e131b53e 100644
--- a/erts/emulator/sys/common/erl_mmap.h
+++ b/erts/emulator/sys/common/erl_mmap.h
@@ -50,8 +50,10 @@ typedef struct {
#define ERTS_MMAP_INIT_DEFAULT_INITER \
{{NULL, NULL}, {NULL, NULL}, 0, 1, (1 << 16), 1}
+#define ERTS_LITERAL_VIRTUAL_AREA_SIZE (UWORD_CONSTANT(1)*1024*1024*1024)
+
#define ERTS_MMAP_INIT_LITERAL_INITER \
- {{NULL, NULL}, {NULL, NULL}, 1024*1024*1024, 1, (1 << 16), 0}
+ {{NULL, NULL}, {NULL, NULL}, ERTS_LITERAL_VIRTUAL_AREA_SIZE, 1, (1 << 16), 0}
typedef struct ErtsMemMapper_ ErtsMemMapper;
diff --git a/erts/emulator/sys/common/erl_mseg.c b/erts/emulator/sys/common/erl_mseg.c
index 461f0faf75..286130bece 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))
erts_exit(ERTS_ABORT_EXIT, "erts_mseg: Unexpected page_size %beu\n", GET_PAGE_SIZE);