1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 22:25:07 +00:00

Kernel: Make allocate_kernel_region() commit the region automatically.

This means that kernel regions will eagerly get physical pages allocated.
It would be nice to zero-fill these on demand instead, but that would
require a bunch of MemoryManager changes.
This commit is contained in:
Andreas Kling 2019-05-14 15:36:24 +02:00
parent 7198e35465
commit 7c10a93d48
2 changed files with 5 additions and 7 deletions

View file

@ -407,6 +407,8 @@ RetainPtr<Region> MemoryManager::allocate_kernel_region(size_t size, String&& na
auto region = adopt(*new Region(laddr, size, move(name), true, true, false));
MM.map_region_at_address(*m_kernel_page_directory, *region, laddr, false);
// FIXME: It would be cool if these could zero-fill on demand instead.
region->commit();
return region;
}