1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-15 03:57:35 +00:00
serenity/Kernel/Heap
Gunnar Beutner f89e8fb71a AK+LibC: Implement malloc_good_size() and use it for Vector/HashTable
This implements the macOS API malloc_good_size() which returns the
true allocation size for a given requested allocation size. This
allows us to make use of all the available memory in a malloc chunk.

For example, for a malloc request of 35 bytes our malloc would
internally use a chunk of size 64, however the remaining 29 bytes
would be unused.

Knowing the true allocation size allows us to request more usable
memory that would otherwise be wasted and make that available for
Vector, HashTable and potentially other callers in the future.
2021-05-15 16:30:14 +02:00
..
Heap.h Everywhere: Use "the SerenityOS developers." in copyright headers 2021-04-29 00:59:26 +02:00
kmalloc.cpp AK+LibC: Implement malloc_good_size() and use it for Vector/HashTable 2021-05-15 16:30:14 +02:00
kmalloc.h AK+LibC: Implement malloc_good_size() and use it for Vector/HashTable 2021-05-15 16:30:14 +02:00
SlabAllocator.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
SlabAllocator.h Kernel: Declare operator new/delete noexcept for MAKE_SLAB_ALLOCATED 2021-05-13 08:29:01 +02:00