mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-29 16:21:29 +00:00
Kernel: Cut allocation size for physical buddy bitmaps in half
We were allocating twice as much memory as we needed for these bitmaps due to a silly typo. Found by tomuta trying to boot with 24 GiB of RAM.
This commit is contained in:
parent
eb7b755937
commit
6cc1247395
Notes:
sideshowbarker
2024-07-18 09:06:19 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/6cc12473958
|
@ -25,7 +25,7 @@ PhysicalZone::PhysicalZone(PhysicalAddress base_address, size_t page_count)
|
|||
for (int order = max_order; order >= 0; --order) {
|
||||
auto& bucket = m_buckets[order];
|
||||
size_t block_size = 2u << order;
|
||||
size_t bitmap_size_for_order = ceil_div((size_t)(chunk_count / block_size), (size_t)1);
|
||||
size_t bitmap_size_for_order = ceil_div((size_t)(chunk_count / block_size), (size_t)2);
|
||||
bucket.order = order;
|
||||
if (bitmap_size_for_order)
|
||||
bucket.bitmap.grow(bitmap_size_for_order, false);
|
||||
|
|
Loading…
Reference in a new issue