1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:08:10 +00:00

Kernel: Let Region keep a Range internally.

This commit is contained in:
Andreas Kling 2019-05-17 04:32:08 +02:00
parent 4a6fcfbacf
commit 87b54a82c7
5 changed files with 26 additions and 26 deletions

View file

@ -404,7 +404,7 @@ RetainPtr<Region> MemoryManager::allocate_kernel_region(size_t size, String&& na
ASSERT(!(size % PAGE_SIZE));
auto range = m_range_allocator.allocate_anywhere(size);
ASSERT(range.is_valid());
auto region = adopt(*new Region(range.base(), range.size(), move(name), true, true, false));
auto region = adopt(*new Region(range, move(name), true, true, false));
MM.map_region_at_address(*m_kernel_page_directory, *region, range.base(), false);
// FIXME: It would be cool if these could zero-fill on demand instead.
region->commit();