aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_binary.h
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-04-11 15:30:11 +0200
committerSverker Eriksson <[email protected]>2017-04-11 15:30:11 +0200
commit5e8f498b810aeae9cb4c9c3715fe62a33b84cdde (patch)
tree1f509dc5061a37d439dca19fc96a1402814ac8cb /erts/emulator/beam/erl_binary.h
parent647984f14188ba2cf73128c09e888d4bcf733a9f (diff)
downloadotp-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_binary.h')
-rw-r--r--erts/emulator/beam/erl_binary.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_binary.h b/erts/emulator/beam/erl_binary.h
index 6ff71ec6d1..cb26ee3407 100644
--- a/erts/emulator/beam/erl_binary.h
+++ b/erts/emulator/beam/erl_binary.h
@@ -411,6 +411,7 @@ erts_bin_nrml_alloc(Uint size)
ERTS_CHK_BIN_ALIGNMENT(res);
res->orig_size = size;
res->flags = 0;
+ erts_refc_init(&res->refc, 1);
return res;
}