mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-24 05:33:06 +00:00
Let opt.zero propagate to core allocation.
I.e. set dopts->zero early on if opt.zero is true, rather than leaving it set by the entry-point function (malloc, calloc, etc.) and then memsetting. This avoids situations where we zero once in the large-alloc pathway and then again via memset.
This commit is contained in:
committed by
David Goldblatt
parent
2c09d43494
commit
f1f8a75496
@@ -32,9 +32,6 @@ large_palloc(tsdn_t *tsdn, arena_t *arena, size_t usize, size_t alignment,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (config_fill && unlikely(opt_zero)) {
|
||||
zero = true;
|
||||
}
|
||||
if (likely(!tsdn_null(tsdn))) {
|
||||
arena = arena_choose_maybe_huge(tsdn_tsd(tsdn), arena, usize);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user