stop zeroing all exchange allocations

This commit is contained in:
Daniel Micay 2013-02-14 15:59:15 -05:00
parent a8f039a085
commit 22e88d510f

View File

@ -14,7 +14,7 @@
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);