From 6c18c75f2d1d9c491f288724d355c11d3788d123 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Sat, 5 Jan 2013 18:04:29 -0800 Subject: [PATCH] rt: Stop zeroing out all allocations. Unobservable perf win. Closes #2682. rs=negligible-perf-win --- src/rt/rust_upcall.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp index c916de11123..8197d9c5450 100644 --- a/src/rt/rust_upcall.cpp +++ b/src/rt/rust_upcall.cpp @@ -158,8 +158,7 @@ upcall_s_exchange_malloc(s_exchange_malloc_args *args) { LOG_UPCALL_ENTRY(task); size_t total_size = get_box_size(args->size, args->td->align); - // FIXME--does this have to be calloc? (Issue #2682) - void *p = task->kernel->calloc(total_size, "exchange malloc"); + void *p = task->kernel->malloc(total_size, "exchange malloc"); rust_opaque_box *header = static_cast(p); header->ref_count = -1; // This is not ref counted @@ -234,8 +233,7 @@ upcall_s_malloc(s_malloc_args *args) { LOG_UPCALL_ENTRY(task); LOG(task, mem, "upcall malloc(0x%" PRIxPTR ")", args->td); - // FIXME--does this have to be calloc? (Issue #2682) - rust_opaque_box *box = task->boxed.calloc(args->td, args->size); + rust_opaque_box *box = task->boxed.malloc(args->td, args->size); void *body = box_body(box); debug::maybe_track_origin(task, box);