aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/beam_bif_load.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/beam_bif_load.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/beam_bif_load.c')
-rw-r--r--erts/emulator/beam/beam_bif_load.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/emulator/beam/beam_bif_load.c b/erts/emulator/beam/beam_bif_load.c
index 92815b2bcd..37e74400bc 100644
--- a/erts/emulator/beam/beam_bif_load.c
+++ b/erts/emulator/beam/beam_bif_load.c
@@ -877,12 +877,12 @@ check_process_code(Process* rp, Module* modp, Uint flags, int *redsp, int fcalls
continue;
{
ErlHeapFragment *hf;
- Uint lit_sz;
+ Uint lit_sz = 0;
for (hf=hfrag; hf; hf = hf->next) {
if (check_mod_funs(rp, &hfrag->off_heap, mod_start, mod_size))
return am_true;
- lit_sz = hfrag_literal_size(&hf->mem[0], &hf->mem[hf->used_size],
- literals, lit_bsize);
+ lit_sz += hfrag_literal_size(&hf->mem[0], &hf->mem[hf->used_size],
+ literals, lit_bsize);
}
if (lit_sz > 0) {
ErlHeapFragment *bp = new_message_buffer(lit_sz);