aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/beam_load.c
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-06-17 05:23:08 +0200
committerBjörn Gustavsson <[email protected]>2016-06-22 12:00:38 +0200
commit644cc778e9770b847700dca41a0c3ebe20da64df (patch)
tree1f453dfe5cc08f94eed2e6dd52c9de819646cf3d /erts/emulator/beam/beam_load.c
parent6a6c72801e6fb021851b4f2591b03ed136a27363 (diff)
downloadotp-644cc778e9770b847700dca41a0c3ebe20da64df.tar.gz
otp-644cc778e9770b847700dca41a0c3ebe20da64df.tar.bz2
otp-644cc778e9770b847700dca41a0c3ebe20da64df.zip
beam_makeops: Save some memory by making loader tables 'const'
Before: $ size bin/x86_64-unknown-linux-gnu/beam.smp text data bss dec hex filename 3080982 188369 158472 3427823 344def bin/x86_64-unknown-linux-gnu/beam.smp After: $ size bin/x86_64-unknown-linux-gnu/beam.smp text data bss dec hex filename 3164694 104657 158472 3427823 344def bin/x86_64-unknown-linux-gnu/beam.smp
Diffstat (limited to 'erts/emulator/beam/beam_load.c')
-rw-r--r--erts/emulator/beam/beam_load.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/beam/beam_load.c b/erts/emulator/beam/beam_load.c
index 0c2743beb2..4ca2c6a13f 100644
--- a/erts/emulator/beam/beam_load.c
+++ b/erts/emulator/beam/beam_load.c
@@ -4860,7 +4860,7 @@ transform_engine(LoaderState* st)
{
Uint op;
int ap; /* Current argument. */
- Uint* restart; /* Where to restart if current match fails. */
+ const Uint* restart; /* Where to restart if current match fails. */
GenOpArg var[TE_MAX_VARS]; /* Buffer for variables. */
GenOpArg* rest_args = NULL;
int num_rest_args = 0;
@@ -4869,7 +4869,7 @@ transform_engine(LoaderState* st)
GenOp* instr;
GenOp* first = st->genop;
GenOp* keep = NULL;
- Uint* pc;
+ const Uint* pc;
static Uint restart_fail[1] = {TOP_fail};
ASSERT(gen_opc[first->op].transform != -1);