optimize calloc when zero on free is disabled

pull/50/head
Daniel Micay 2018-09-07 16:32:51 -04:00
parent 8f921e30be
commit 9a1acce5eb
1 changed files with 1 additions and 1 deletions

View File

@ -785,7 +785,7 @@ EXPORT void *h_calloc(size_t nmemb, size_t size) {
if (unlikely(p == NULL)) {
return NULL;
}
if (size) {
if (size && size <= max_slab_size_class) {
memset(p, 0, total_size - canary_size);
}
return p;