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/erl_bits.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/erl_bits.c')
-rw-r--r-- | erts/emulator/beam/erl_bits.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_bits.c b/erts/emulator/beam/erl_bits.c index 885e955332..de4fa3594d 100644 --- a/erts/emulator/beam/erl_bits.c +++ b/erts/emulator/beam/erl_bits.c @@ -1404,7 +1404,6 @@ erts_bs_append(Process* c_p, Eterm* reg, Uint live, Eterm build_size_term, * Allocate the binary data struct itself. */ bptr = erts_bin_nrml_alloc(bin_size); - erts_refc_init(&bptr->refc, 1); erts_current_bin = (byte *) bptr->orig_bytes; /* @@ -1518,7 +1517,6 @@ erts_bs_private_append(Process* p, Eterm bin, Eterm build_size_term, Uint unit) * binary and copy the contents of the old binary into it. */ Binary* bptr = erts_bin_nrml_alloc(new_size); - erts_refc_init(&bptr->refc, 1); sys_memcpy(bptr->orig_bytes, binp->orig_bytes, binp->orig_size); pb->flags |= PB_IS_WRITABLE | PB_ACTIVE_WRITER; pb->val = bptr; @@ -1565,7 +1563,6 @@ erts_bs_init_writable(Process* p, Eterm sz) * Allocate the binary data struct itself. */ bptr = erts_bin_nrml_alloc(bin_size); - erts_refc_init(&bptr->refc, 1); /* * Now allocate the ProcBin on the heap. |