diff options
author | Björn-Egil Dahlberg <[email protected]> | 2016-08-01 11:00:48 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2016-08-01 11:00:48 +0200 |
commit | 61d70a02f3a5e51bd209c8f25df784f1e4c71cbd (patch) | |
tree | 12a918049cda86e9e1c5846bd938e26417716baa /erts/emulator/beam/beam_bif_load.c | |
parent | e7302e71bf2d56e2117237bb6f0df49cefc9aad2 (diff) | |
parent | e52fa24451306080be39a35444cf52210982b41a (diff) | |
download | otp-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.c | 6 |
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); |