From 2b53f2b1514b0d405ab92c767277483c761ad928 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Thu, 4 Sep 2014 20:10:54 +0200 Subject: 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. --- erts/emulator/beam/beam_emu.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'erts/emulator/beam/beam_emu.c') diff --git a/erts/emulator/beam/beam_emu.c b/erts/emulator/beam/beam_emu.c index 8bfb7d2ad2..32961da271 100644 --- a/erts/emulator/beam/beam_emu.c +++ b/erts/emulator/beam/beam_emu.c @@ -3782,8 +3782,6 @@ get_map_elements_fail: * Allocate the binary struct itself. */ bptr = erts_bin_nrml_alloc(num_bytes); - bptr->flags = 0; - bptr->orig_size = num_bytes; erts_refc_init(&bptr->refc, 1); erts_current_bin = (byte *) bptr->orig_bytes; @@ -3883,8 +3881,6 @@ get_map_elements_fail: * Allocate the binary struct itself. */ bptr = erts_bin_nrml_alloc(tmp_arg1); - bptr->flags = 0; - bptr->orig_size = tmp_arg1; erts_refc_init(&bptr->refc, 1); erts_current_bin = (byte *) bptr->orig_bytes; -- cgit v1.2.3