Only zero large allocations when necessary (for calloc()).

This commit is contained in:
Jason Evans 2007-11-28 00:17:34 +00:00
parent b6b7fd3e2a
commit 7e42e29b9b

View File

@ -2598,7 +2598,7 @@ arena_malloc(arena_t *arena, size_t size, bool zero)
/* Large allocation. */
size = PAGE_CEILING(size);
arena_lock_balance(arena);
ret = (void *)arena_run_alloc(arena, size, true); // XXX zero?
ret = (void *)arena_run_alloc(arena, size, zero);
if (ret == NULL) {
malloc_spin_unlock(&arena->lock);
return (NULL);