aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
diff options
context:
space:
mode:
authorMagnus Lång <[email protected]>2017-04-08 10:48:01 +0200
committerMagnus Lång <[email protected]>2017-11-05 20:52:48 +0100
commit7503303b0cba1e02320bdf604e0d0997b7c2ff59 (patch)
tree6cd3f5e63fa2cbe190a45359457076f3659a6575 /erts/emulator
parent14250efc69cacde4310aeb89b3b1ef631d8e5fe9 (diff)
downloadotp-7503303b0cba1e02320bdf604e0d0997b7c2ff59.tar.gz
otp-7503303b0cba1e02320bdf604e0d0997b7c2ff59.tar.bz2
otp-7503303b0cba1e02320bdf604e0d0997b7c2ff59.zip
HiPE: Support literal tags
Literal tags are used by the VM as an alternative to reserving a large virtual memory space in order to be able to quickly identify which terms are literals. The use of literal tags harms performance, but is useful to support systems where allocating a large amount of virtual memory is not an option.
Diffstat (limited to 'erts/emulator')
-rw-r--r--erts/emulator/beam/erl_term.h3
-rw-r--r--erts/emulator/hipe/hipe_mkliterals.c9
2 files changed, 9 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_term.h b/erts/emulator/beam/erl_term.h
index 5ec6b6b44b..7d42d1b396 100644
--- a/erts/emulator/beam/erl_term.h
+++ b/erts/emulator/beam/erl_term.h
@@ -55,9 +55,6 @@ struct erl_node_; /* Declared in erl_node_tables.h */
#if defined(ARCH_64)
# define TAG_PTR_MASK__ 0x7
# if !defined(ERTS_HAVE_OS_PHYSICAL_MEMORY_RESERVATION)
-# ifdef HIPE
-# error Hipe on 64-bit needs a real mmap as it does not support the literal tag
-# endif
# define TAG_LITERAL_PTR 0x4
# else
# undef TAG_LITERAL_PTR
diff --git a/erts/emulator/hipe/hipe_mkliterals.c b/erts/emulator/hipe/hipe_mkliterals.c
index 6ea120c65c..de00994d64 100644
--- a/erts/emulator/hipe/hipe_mkliterals.c
+++ b/erts/emulator/hipe/hipe_mkliterals.c
@@ -462,6 +462,15 @@ static const struct rts_param rts_params[] = {
0
#endif
},
+ /* This flag is always defined, but its value is configuration-dependent. */
+ { 17, "ERTS_USE_LITERAL_TAG",
+ 1,
+#if defined(TAG_LITERAL_PTR)
+ 1
+#else
+ 0
+#endif
+ },
/* This parameter is always defined, but its value depends on ERTS_SMP. */
{ 19, "MSG_MESSAGE",
1, offsetof(struct erl_mesg, m[0])