mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
Kernel: Use type alias for Kmalloc SubHeap and SlabBlock list types
We've moved to this pattern for the majority of usages of IntrusiveList in the Kernel, might as well be consistent. :^)
This commit is contained in:
parent
474e3ffc85
commit
8b99fb26d9
Notes:
sideshowbarker
2024-07-17 22:04:37 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/8b99fb26d91 Pull-request: https://github.com/SerenityOS/serenity/pull/11454
1 changed files with 5 additions and 3 deletions
|
@ -44,6 +44,7 @@ struct KmallocSubheap {
|
|||
}
|
||||
|
||||
IntrusiveListNode<KmallocSubheap> list_node;
|
||||
using List = IntrusiveList<&KmallocSubheap::list_node>;
|
||||
Heap<CHUNK_SIZE, KMALLOC_SCRUB_BYTE, KFREE_SCRUB_BYTE> allocator;
|
||||
};
|
||||
|
||||
|
@ -82,6 +83,7 @@ public:
|
|||
}
|
||||
|
||||
IntrusiveListNode<KmallocSlabBlock> list_node;
|
||||
using List = IntrusiveList<&KmallocSlabBlock::list_node>;
|
||||
|
||||
private:
|
||||
struct FreelistEntry {
|
||||
|
@ -138,8 +140,8 @@ public:
|
|||
private:
|
||||
size_t m_slab_size { 0 };
|
||||
|
||||
IntrusiveList<&KmallocSlabBlock::list_node> m_usable_blocks;
|
||||
IntrusiveList<&KmallocSlabBlock::list_node> m_full_blocks;
|
||||
KmallocSlabBlock::List m_usable_blocks;
|
||||
KmallocSlabBlock::List m_full_blocks;
|
||||
};
|
||||
|
||||
struct KmallocGlobalData {
|
||||
|
@ -294,7 +296,7 @@ struct KmallocGlobalData {
|
|||
};
|
||||
Optional<ExpansionData> expansion_data;
|
||||
|
||||
IntrusiveList<&KmallocSubheap::list_node> subheaps;
|
||||
KmallocSubheap::List subheaps;
|
||||
|
||||
KmallocSlabheap slabheaps[6] = { 16, 32, 64, 128, 256, 512 };
|
||||
|
||||
|
|
Loading…
Reference in a new issue