mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-07 09:04:30 +00:00
Kernel: Refactor MemoryManager to use a Bitmap rather than a Vector
This significantly reduces the pressure on the kernel heap when allocating a lot of pages. Previously at about 250MB allocated, the free page list would outgrow the kernel's heap. Given that there is no longer a page list, this does not happen. The next barrier will be the kernel memory used by the page records for in-use memory. This kicks in at about 1GB.
This commit is contained in:
committed by
Andreas Kling
parent
1a77dfed23
commit
aee9317d86
@@ -103,7 +103,7 @@ int Region::commit()
|
||||
for (size_t i = first_page_index(); i <= last_page_index(); ++i) {
|
||||
if (!vmo().physical_pages()[i].is_null())
|
||||
continue;
|
||||
auto physical_page = MM.allocate_physical_page(MemoryManager::ShouldZeroFill::Yes);
|
||||
auto physical_page = MM.allocate_user_physical_page(MemoryManager::ShouldZeroFill::Yes);
|
||||
if (!physical_page) {
|
||||
kprintf("MM: commit was unable to allocate a physical page\n");
|
||||
return -ENOMEM;
|
||||
|
||||
Reference in New Issue
Block a user