mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:37:35 +00:00
Kernel: Implement kmalloc_good_size for the new kmalloc
This lets kmalloc-aware data structures like Vector and HashTable use up the extra wasted space we allocate in the slab heaps & heap chunks.
This commit is contained in:
parent
c204885a94
commit
29eee390ec
2 changed files with 10 additions and 1 deletions
|
@ -44,6 +44,8 @@ class Heap {
|
|||
}
|
||||
|
||||
public:
|
||||
static constexpr size_t AllocationHeaderSize = sizeof(AllocationHeader);
|
||||
|
||||
Heap(u8* memory, size_t memory_size)
|
||||
: m_total_chunks(calculate_chunks(memory_size))
|
||||
, m_chunks(memory)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue