rt: Stop zeroing out all allocations. Unobservable perf win. Closes #2682. rs=negligible-perf-win

This commit is contained in:
Patrick Walton 2013-01-05 18:04:29 -08:00
parent 7b245d46ed
commit 6c18c75f2d

View file

@ -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<rust_opaque_box*>(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);