aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/io.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2014-09-17 20:49:22 +0200
committerSverker Eriksson <[email protected]>2014-09-17 20:49:22 +0200
commit86b7cf42011302a78cb73ec4f339a2b31af8ae9a (patch)
treeed946bbce166d1c012788522f5508ec01fa006a2 /erts/emulator/beam/io.c
parent723fea8f585c3006aa5cbda7d33de44d054eeafa (diff)
parent933a5f071e0dc7f2051e1ccc58ca4e361db52ef4 (diff)
downloadotp-86b7cf42011302a78cb73ec4f339a2b31af8ae9a.tar.gz
otp-86b7cf42011302a78cb73ec4f339a2b31af8ae9a.tar.bz2
otp-86b7cf42011302a78cb73ec4f339a2b31af8ae9a.zip
Merge branch 'sverk/bin-alloc-refactor'
* sverk/bin-alloc-refactor: erts: Fix gdb command etp-carrier-blocks for 32-bit erts: Refactor binary allocation interface to also initialize Binary
Diffstat (limited to 'erts/emulator/beam/io.c')
-rw-r--r--erts/emulator/beam/io.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/erts/emulator/beam/io.c b/erts/emulator/beam/io.c
index 9ae973e108..4d262ff022 100644
--- a/erts/emulator/beam/io.c
+++ b/erts/emulator/beam/io.c
@@ -3153,8 +3153,6 @@ static void deliver_read_message(Port* prt, erts_aint32_t state, Eterm to,
Binary* bptr;
bptr = erts_bin_nrml_alloc(len);
- bptr->flags = 0;
- bptr->orig_size = len;
erts_refc_init(&bptr->refc, 1);
sys_memcpy(bptr->orig_bytes, buf, len);
@@ -5506,8 +5504,6 @@ driver_deliver_term(Eterm to, ErlDrvTermData* data, int len)
ProcBin* pbp;
Binary* bp = erts_bin_nrml_alloc(size);
ASSERT(bufp);
- bp->flags = 0;
- bp->orig_size = (SWord) size;
erts_refc_init(&bp->refc, 1);
sys_memcpy((void *) bp->orig_bytes, (void *) bufp, size);
pbp = (ProcBin *) hp;
@@ -5999,9 +5995,7 @@ driver_alloc_binary(ErlDrvSizeT size)
bin = erts_bin_drv_alloc_fnf((Uint) size);
if (!bin)
return NULL; /* The driver write must take action */
- bin->flags = BIN_FLAG_DRV;
erts_refc_init(&bin->refc, 1);
- bin->orig_size = (SWord) size;
return Binary2ErlDrvBinary(bin);
}
@@ -6031,7 +6025,6 @@ ErlDrvBinary* driver_realloc_binary(ErlDrvBinary* bin, ErlDrvSizeT size)
if (!newbin)
return NULL;
- newbin->orig_size = size;
return Binary2ErlDrvBinary(newbin);
}