diff options
author | Sverker Eriksson <[email protected]> | 2014-09-04 20:10:54 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2014-09-04 20:17:59 +0200 |
commit | 2b53f2b1514b0d405ab92c767277483c761ad928 (patch) | |
tree | 614f9ccb33969eb17bd7bf59967854d276b90257 /erts/emulator/beam/binary.c | |
parent | 35ff91189c8dd4ceed3d8f29536f500787ba4782 (diff) | |
download | otp-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/binary.c')
-rw-r--r-- | erts/emulator/beam/binary.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/erts/emulator/beam/binary.c b/erts/emulator/beam/binary.c index f50d484576..b014bca108 100644 --- a/erts/emulator/beam/binary.c +++ b/erts/emulator/beam/binary.c @@ -83,8 +83,6 @@ new_binary(Process *p, byte *buf, Uint len) * Allocate the binary struct itself. */ bptr = erts_bin_nrml_alloc(len); - bptr->flags = 0; - bptr->orig_size = len; erts_refc_init(&bptr->refc, 1); if (buf != NULL) { sys_memcpy(bptr->orig_bytes, buf, len); @@ -122,8 +120,6 @@ Eterm erts_new_mso_binary(Process *p, byte *buf, int len) * Allocate the binary struct itself. */ bptr = erts_bin_nrml_alloc(len); - bptr->flags = 0; - bptr->orig_size = len; erts_refc_init(&bptr->refc, 1); if (buf != NULL) { sys_memcpy(bptr->orig_bytes, buf, len); @@ -177,7 +173,6 @@ erts_realloc_binary(Eterm bin, size_t size) } else { /* REFC */ ProcBin* pb = (ProcBin *) bval; Binary* newbin = erts_bin_realloc(pb->val, size); - newbin->orig_size = size; pb->val = newbin; pb->size = size; pb->bytes = (byte*) newbin->orig_bytes; |