LibC: Don't memset 0 mmap'd callocs
There is no reason to page everything in and the kernel already guarantees that the memory is zeroed in mmap
This commit is contained in:
@@ -370,6 +370,7 @@ void* calloc(size_t nmemb, size_t size)
|
||||
if (ptr == nullptr)
|
||||
return nullptr;
|
||||
|
||||
if (total < s_mmap_threshold)
|
||||
memset(ptr, 0, total);
|
||||
return ptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user