mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:07:35 +00:00
Kernel: Add FIXME about allocation waste in kmalloc slabheap
This commit is contained in:
parent
43099fb387
commit
66d35f2936
1 changed files with 2 additions and 0 deletions
|
@ -105,6 +105,8 @@ public:
|
||||||
void* allocate()
|
void* allocate()
|
||||||
{
|
{
|
||||||
if (m_usable_blocks.is_empty()) {
|
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);
|
auto* slot = kmalloc_aligned(KmallocSlabBlock::block_size, KmallocSlabBlock::block_size);
|
||||||
if (!slot) {
|
if (!slot) {
|
||||||
// FIXME: Dare to return nullptr!
|
// FIXME: Dare to return nullptr!
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue