Skip to content

Commit 22e88d5

Browse files
committed
stop zeroing all exchange allocations
1 parent a8f039a commit 22e88d5

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/libcore/private/exchange_alloc.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use c_malloc = libc::malloc;
1414
use c_free = libc::free;
1515
use managed::raw::{BoxHeaderRepr, BoxRepr};
1616
use cast::transmute;
17-
use ptr::{set_memory, null};
17+
use ptr::null;
1818
use intrinsic::TyDesc;
1919

2020
pub unsafe fn malloc(td: *TypeDesc, size: uint) -> *c_void {
@@ -25,10 +25,6 @@ pub unsafe fn malloc(td: *TypeDesc, size: uint) -> *c_void {
2525
let p = c_malloc(total_size as size_t);
2626
assert p.is_not_null();
2727

28-
// FIXME #4761: Would be very nice to not memset all allocations
29-
let p: *mut u8 = transmute(p);
30-
set_memory(p, 0, total_size);
31-
3228
// FIXME #3475: Converting between our two different tydesc types
3329
let td: *TyDesc = transmute(td);
3430

0 commit comments

Comments
 (0)