summaryrefslogtreecommitdiff
path: root/Kernel/Heap/SlabAllocator.h
AgeCommit message (Collapse)Author
2020-02-16Kernel: Move all code into the Kernel namespaceAndreas Kling
2020-02-02Kernel: Remove unnecessary forward declaration in SlabAllocatorAndreas Kling
2020-02-01Kernel: Add memory scrubbing in slab_alloc() and slab_dealloc()Andreas Kling
These now scrub allocated and freed memory like kmalloc()/kfree() was already doing.
2020-01-18Meta: Add license header to source filesAndreas Kling
As suggested by Joshua, this commit adds the 2-clause BSD license as a comment block to the top of every source file. For the first pass, I've just added myself for simplicity. I encourage everyone to add themselves as copyright holders of any file they've added or modified in some significant way. If I've added myself in error somewhere, feel free to replace it with the appropriate copyright holder instead. Going forward, all new source files should include a license header.
2019-09-16Kernel: Add a simple slab allocator for small allocationsAndreas Kling
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.