aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_bif_binary.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2014-09-04 20:10:54 +0200
committerSverker Eriksson <[email protected]>2014-09-04 20:17:59 +0200
commit2b53f2b1514b0d405ab92c767277483c761ad928 (patch)
tree614f9ccb33969eb17bd7bf59967854d276b90257 /erts/emulator/beam/erl_bif_binary.c
parent35ff91189c8dd4ceed3d8f29536f500787ba4782 (diff)
downloadotp-2b53f2b1514b0d405ab92c767277483c761ad928.tar.gz
otp-2b53f2b1514b0d405ab92c767277483c761ad928.tar.bz2
otp-2b53f2b1514b0d405ab92c767277483c761ad928.zip
erts: Refactor binary allocation interface to also initialize Binary
except the reference counter 'refc', as different callers have different strategies regarding the lifetime of the binary.
Diffstat (limited to 'erts/emulator/beam/erl_bif_binary.c')
-rw-r--r--erts/emulator/beam/erl_bif_binary.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_bif_binary.c b/erts/emulator/beam/erl_bif_binary.c
index 3bf78adce7..85bc2daf5d 100644
--- a/erts/emulator/beam/erl_bif_binary.c
+++ b/erts/emulator/beam/erl_bif_binary.c
@@ -2424,8 +2424,6 @@ static BIF_RETTYPE do_binary_copy(Process *p, Eterm bin, Eterm en)
}
cbs->result = erts_bin_nrml_alloc(target_size); /* Always offheap
if trapping */
- cbs->result->flags = 0;
- cbs->result->orig_size = target_size;
erts_refc_init(&(cbs->result->refc), 1);
t = (byte *) cbs->result->orig_bytes; /* No offset or anything */
pos = 0;