mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-24 23:23:58 +00:00
Kernel: Allocate more 8-byte slabs than anything else
We need these for PhysicalPage objects. Ultimately I'd like to get rid of these objects entirely, but while we still have to deal with them, let's at least handle large demand a bit better.
This commit is contained in:
parent
8f842375a2
commit
d553bae749
Notes:
sideshowbarker
2024-07-19 11:51:37 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/d553bae749f
1 changed files with 4 additions and 3 deletions
|
@ -79,9 +79,10 @@ void for_each_allocator(Callback callback)
|
||||||
|
|
||||||
void slab_alloc_init()
|
void slab_alloc_init()
|
||||||
{
|
{
|
||||||
for_each_allocator([&](auto& allocator) {
|
s_slab_allocator_8.init(384 * KB);
|
||||||
allocator.init(128 * KB);
|
s_slab_allocator_16.init(128 * KB);
|
||||||
});
|
s_slab_allocator_32.init(128 * KB);
|
||||||
|
s_slab_allocator_48.init(128 * KB);
|
||||||
}
|
}
|
||||||
|
|
||||||
void* slab_alloc(size_t slab_size)
|
void* slab_alloc(size_t slab_size)
|
||||||
|
|
Loading…
Reference in a new issue