aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_gc.c
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2016-08-01 11:00:48 +0200
committerBjörn-Egil Dahlberg <[email protected]>2016-08-01 11:00:48 +0200
commit61d70a02f3a5e51bd209c8f25df784f1e4c71cbd (patch)
tree12a918049cda86e9e1c5846bd938e26417716baa /erts/emulator/beam/erl_gc.c
parente7302e71bf2d56e2117237bb6f0df49cefc9aad2 (diff)
parente52fa24451306080be39a35444cf52210982b41a (diff)
downloadotp-61d70a02f3a5e51bd209c8f25df784f1e4c71cbd.tar.gz
otp-61d70a02f3a5e51bd209c8f25df784f1e4c71cbd.tar.bz2
otp-61d70a02f3a5e51bd209c8f25df784f1e4c71cbd.zip
Merge branch 'egil/erts/dont-copy-literals/OTP-13529'
* egil/erts/dont-copy-literals/OTP-13529: erts: Refactor literal purge area arguments erts: No need to literal opt message token erts: Don't copy literals in enif_send erts: Fix literal size calculation in check_process_code erts: Remove the need for copying of literals
Diffstat (limited to 'erts/emulator/beam/erl_gc.c')
-rw-r--r--erts/emulator/beam/erl_gc.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c
index 8b0dd9a5a6..ef18a508a5 100644
--- a/erts/emulator/beam/erl_gc.c
+++ b/erts/emulator/beam/erl_gc.c
@@ -2157,26 +2157,18 @@ copy_one_frag(Eterm** hpp, ErlOffHeap* off_heap,
*hp++ = val;
break;
case TAG_PRIMARY_LIST:
-#ifdef SHCOPY_SEND
if (erts_is_literal(val,list_val(val))) {
*hp++ = val;
} else {
*hp++ = offset_ptr(val, offs);
}
-#else
- *hp++ = offset_ptr(val, offs);
-#endif
break;
case TAG_PRIMARY_BOXED:
-#ifdef SHCOPY_SEND
if (erts_is_literal(val,boxed_val(val))) {
*hp++ = val;
} else {
*hp++ = offset_ptr(val, offs);
}
-#else
- *hp++ = offset_ptr(val, offs);
-#endif
break;
case TAG_PRIMARY_HEADER:
*hp++ = val;
@@ -2262,10 +2254,12 @@ move_msgq_to_heap(Process *p)
ASSERT(mp->data.dist_ext->heap_size >= 0);
if (is_not_nil(ERL_MESSAGE_TOKEN(mp))) {
bp = erts_dist_ext_trailer(mp->data.dist_ext);
+ /* Tokens does not use literal optimization */
ERL_MESSAGE_TOKEN(mp) = copy_struct(ERL_MESSAGE_TOKEN(mp),
bp->used_size,
- &factory.hp,
- factory.off_heap);
+ &factory.hp,
+ factory.off_heap);
+
erts_cleanup_offheap(&bp->off_heap);
}
ERL_MESSAGE_TERM(mp) = erts_decode_dist_ext(&factory,