aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorJohn Högberg <[email protected]>2018-11-09 10:07:23 +0100
committerJohn Högberg <[email protected]>2018-11-09 12:53:44 +0100
commitd61d422d4211b5b319ca6d5dee2cc63dbfeff538 (patch)
tree5581b2666962391757124c919d00a7f03eff917a /erts/emulator/beam
parent14cfdc2e8026dde8adeb43b6efb05122d7ff7c59 (diff)
downloadotp-d61d422d4211b5b319ca6d5dee2cc63dbfeff538.tar.gz
otp-d61d422d4211b5b319ca6d5dee2cc63dbfeff538.tar.bz2
otp-d61d422d4211b5b319ca6d5dee2cc63dbfeff538.zip
Don't use too many reductions in lists:reverse/2
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/erl_bif_lists.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_bif_lists.c b/erts/emulator/beam/erl_bif_lists.c
index 735ad3cae3..9b6b84d000 100644
--- a/erts/emulator/beam/erl_bif_lists.c
+++ b/erts/emulator/beam/erl_bif_lists.c
@@ -1082,7 +1082,7 @@ static BIF_RETTYPE lists_reverse_alloc(Process *c_p,
list = list_in;
tail = tail_in;
- cells_left = max_cells = CELLS_PER_RED * (1 + ERTS_BIF_REDS_LEFT(c_p));
+ cells_left = max_cells = CELLS_PER_RED * ERTS_BIF_REDS_LEFT(c_p);
lookahead = list;
while (cells_left != 0 && is_list(lookahead)) {
@@ -1131,7 +1131,7 @@ static BIF_RETTYPE lists_reverse_onheap(Process *c_p,
list = list_in;
tail = tail_in;
- cells_left = max_cells = CELLS_PER_RED * (1 + ERTS_BIF_REDS_LEFT(c_p));
+ cells_left = max_cells = CELLS_PER_RED * ERTS_BIF_REDS_LEFT(c_p);
ASSERT(HEAP_LIMIT(c_p) >= HEAP_TOP(c_p) + 2);
alloc_start = HEAP_TOP(c_p);