aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmytro Lytovchenko <[email protected]>2018-10-23 09:14:11 +0200
committerJohn Högberg <[email protected]>2018-10-25 07:47:23 +0200
commit0aad6ef3bf360f2971d5c8b22620aecc3cdae3ef (patch)
tree57b01b806e602ccd5a33920229e36af98dbc58f4
parent19972f42719c6e9357e33e123d00b681213022dc (diff)
downloadotp-0aad6ef3bf360f2971d5c8b22620aecc3cdae3ef.tar.gz
otp-0aad6ef3bf360f2971d5c8b22620aecc3cdae3ef.tar.bz2
otp-0aad6ef3bf360f2971d5c8b22620aecc3cdae3ef.zip
Clarify a magical allocation size
-rw-r--r--erts/emulator/beam/external.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/erts/emulator/beam/external.c b/erts/emulator/beam/external.c
index 621ba108ba..9a66e491f3 100644
--- a/erts/emulator/beam/external.c
+++ b/erts/emulator/beam/external.c
@@ -1953,7 +1953,8 @@ static Eterm erts_term_to_binary_int(Process* p, Eterm Term, int level, Uint fla
#define RETURN_STATE() \
do { \
- hp = HAlloc(p, ERTS_MAGIC_REF_THING_SIZE+3); \
+ static const int TUPLE2_SIZE = 2 + 1; \
+ hp = HAlloc(p, ERTS_MAGIC_REF_THING_SIZE + TUPLE2_SIZE); \
c_term = erts_mk_magic_ref(&hp, &MSO(p), context_b); \
res = TUPLE2(hp, Term, c_term); \
BUMP_ALL_REDS(p); \