From 22e88d510f09a29a6799c4522d6c6ae83c324a64 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Thu, 14 Feb 2013 15:59:15 -0500 Subject: [PATCH] stop zeroing all exchange allocations --- src/libcore/private/exchange_alloc.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/libcore/private/exchange_alloc.rs b/src/libcore/private/exchange_alloc.rs index 4a3c8d59af59..f7fcf3bdd5eb 100644 --- a/src/libcore/private/exchange_alloc.rs +++ b/src/libcore/private/exchange_alloc.rs @@ -14,7 +14,7 @@ use c_malloc = libc::malloc; use c_free = libc::free; use managed::raw::{BoxHeaderRepr, BoxRepr}; use cast::transmute; -use ptr::{set_memory, null}; +use ptr::null; use intrinsic::TyDesc; pub unsafe fn malloc(td: *TypeDesc, size: uint) -> *c_void { @@ -25,10 +25,6 @@ pub unsafe fn malloc(td: *TypeDesc, size: uint) -> *c_void { let p = c_malloc(total_size as size_t); assert p.is_not_null(); - // FIXME #4761: Would be very nice to not memset all allocations - let p: *mut u8 = transmute(p); - set_memory(p, 0, total_size); - // FIXME #3475: Converting between our two different tydesc types let td: *TyDesc = transmute(td);