about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaniel Micay <danielmicay@gmail.com>2013-02-14 15:59:15 -0500
committerDaniel Micay <danielmicay@gmail.com>2013-02-14 15:59:15 -0500
commit22e88d510f09a29a6799c4522d6c6ae83c324a64 (patch)
treede420b800080fec0380f038836f9e2abab795d20
parenta8f039a085c7d7622899b7a4d1bebfe2d7621165 (diff)
downloadrust-22e88d510f09a29a6799c4522d6c6ae83c324a64.tar.gz
rust-22e88d510f09a29a6799c4522d6c6ae83c324a64.zip
stop zeroing all exchange allocations
-rw-r--r--src/libcore/private/exchange_alloc.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/libcore/private/exchange_alloc.rs b/src/libcore/private/exchange_alloc.rs
index 4a3c8d59af5..f7fcf3bdd5e 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);