diff options
author | Andreas Kling <kling@serenityos.org> | 2021-12-26 18:47:20 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-12-26 21:22:59 +0100 |
commit | 66d35f29366f197866c6d7b1caca6a6d025fd378 (patch) | |
tree | 737054186ee2458c767193f4d0863bdae2dfc2fb /Kernel/Heap | |
parent | 43099fb3876dd17953fa7475ced711fe1585c083 (diff) | |
download | serenity-66d35f29366f197866c6d7b1caca6a6d025fd378.zip |
Kernel: Add FIXME about allocation waste in kmalloc slabheap
Diffstat (limited to 'Kernel/Heap')
-rw-r--r-- | Kernel/Heap/kmalloc.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Kernel/Heap/kmalloc.cpp b/Kernel/Heap/kmalloc.cpp index 5650b45ab8..f19c4354c9 100644 --- a/Kernel/Heap/kmalloc.cpp +++ b/Kernel/Heap/kmalloc.cpp @@ -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! |