mirror of
https://github.com/RGBCube/serenity
synced 2026-01-15 19:41:00 +00:00
Since the allocated memory is going to be zeroed immediately anyway, let's avoid redundantly scrubbing it with MALLOC_SCRUB_BYTE just before that. The latest versions of gcc and Clang can automatically do this malloc + memset -> calloc optimization, but I've seen a couple of places where it failed to be done. This commit also adds a naive kcalloc function to the kernel that doesn't (yet) eliminate the redundancy like the userland does. |
||
|---|---|---|
| .. | ||
| Heap.h | ||
| kmalloc.cpp | ||
| kmalloc.h | ||