diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-09-16 10:19:44 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-09-16 10:33:27 +0200 |
commit | 5d491fa1cdad08424449e129ba30baf76e7da6d1 (patch) | |
tree | 0b1ba86ca206f414f9bf9e0c759294dadc9d2458 /Libraries/LibC/netdb.cpp | |
parent | 1c692e87a647b26dc21825707b41b740a465a570 (diff) | |
download | serenity-5d491fa1cdad08424449e129ba30baf76e7da6d1.zip |
Kernel: Add a simple slab allocator for small allocations
This is a freelist allocator with static size classes that works as a
complement to the generic kmalloc(). It's a lot faster than kmalloc()
since allocation just means popping from the freelist.
It's also significantly more compact when there are a lot of objects
smaller than the minimum kmalloc chunk size (32 bytes.)
This patch enables it for the Region and PhysicalPage classes.
In the PhysicalPage (8 bytes) case, it's a huge improvement since we
no longer waste 75% of the storage allocated.
There are also a number of ways this can be improved, so let's keep
working on it going forward.
Diffstat (limited to 'Libraries/LibC/netdb.cpp')
0 files changed, 0 insertions, 0 deletions