Kernel: Add FIXME about allocation waste in kmalloc slabheap

This commit is contained in:
Andreas Kling 2021-12-26 18:47:20 +01:00
commit 66d35f2936
Notes: sideshowbarker 2024-07-17 22:09:50 +09:00

View file

@ -105,6 +105,8 @@ public:
void* allocate()
{
if (m_usable_blocks.is_empty()) {
// FIXME: This allocation wastes `block_size` bytes due to the implementation of kmalloc_aligned().
// Handle this with a custom VM+page allocator instead of using kmalloc_aligned().
auto* slot = kmalloc_aligned(KmallocSlabBlock::block_size, KmallocSlabBlock::block_size);
if (!slot) {
// FIXME: Dare to return nullptr!