summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorBrian Gianforcaro <bgianf@serenityos.org>2021-12-27 16:32:38 -0800
committerAndreas Kling <kling@serenityos.org>2021-12-28 09:17:06 +0100
commit8b99fb26d919a0326390ecb2d21007edf20eb3e7 (patch)
tree27c6c98a693e645f169277eafc1f648fec6b0d66 /Kernel
parent474e3ffc8545950ff2e829f2740924b86a88be35 (diff)
downloadserenity-8b99fb26d919a0326390ecb2d21007edf20eb3e7.zip
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. :^)
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/Heap/kmalloc.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/Kernel/Heap/kmalloc.cpp b/Kernel/Heap/kmalloc.cpp
index 147f502716..1d82053781 100644
--- a/Kernel/Heap/kmalloc.cpp
+++ b/Kernel/Heap/kmalloc.cpp
@@ -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 };