diff options
author | Sverker Eriksson <[email protected]> | 2017-04-11 15:30:11 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2017-04-11 15:30:11 +0200 |
commit | 5e8f498b810aeae9cb4c9c3715fe62a33b84cdde (patch) | |
tree | 1f509dc5061a37d439dca19fc96a1402814ac8cb /erts/emulator/beam/io.c | |
parent | 647984f14188ba2cf73128c09e888d4bcf733a9f (diff) | |
download | otp-5e8f498b810aeae9cb4c9c3715fe62a33b84cdde.tar.gz otp-5e8f498b810aeae9cb4c9c3715fe62a33b84cdde.tar.bz2 otp-5e8f498b810aeae9cb4c9c3715fe62a33b84cdde.zip |
erts: Init refc=1 in erts_bin_nrml_alloc
Only term_to_binary needed some extra attention
as it used to initialize refc as 0 instead of 1.
Diffstat (limited to 'erts/emulator/beam/io.c')
-rw-r--r-- | erts/emulator/beam/io.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/erts/emulator/beam/io.c b/erts/emulator/beam/io.c index ddff862607..c85f900de5 100644 --- a/erts/emulator/beam/io.c +++ b/erts/emulator/beam/io.c @@ -3791,7 +3791,6 @@ static void deliver_read_message(Port* prt, erts_aint32_t state, Eterm to, Binary* bptr; bptr = erts_bin_nrml_alloc(len); - erts_refc_init(&bptr->refc, 1); sys_memcpy(bptr->orig_bytes, buf, len); pb = (ProcBin *) hp; @@ -6400,7 +6399,6 @@ driver_deliver_term(Port *prt, Eterm to, ErlDrvTermData* data, int len) ProcBin* pbp; Binary* bp = erts_bin_nrml_alloc(size); ASSERT(bufp); - erts_refc_init(&bp->refc, 1); sys_memcpy((void *) bp->orig_bytes, (void *) bufp, size); pbp = (ProcBin *) erts_produce_heap(&factory, PROC_BIN_SIZE, HEAP_EXTRA); |