1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:27:35 +00:00

Kernel: Remove Region API's for setting/unsetting the page directory

This is done implicitly by mapping or unmapping the region.
This commit is contained in:
Andreas Kling 2019-11-04 00:23:31 +01:00
parent e3dda4e87b
commit 6ed9cc4717
2 changed files with 3 additions and 14 deletions

View file

@ -213,13 +213,14 @@ void Region::unmap(ShouldDeallocateVirtualMemoryRange deallocate_range)
}
if (deallocate_range == ShouldDeallocateVirtualMemoryRange::Yes)
page_directory()->range_allocator().deallocate(range());
release_page_directory();
m_page_directory = nullptr;
}
void Region::map(PageDirectory& page_directory)
{
ASSERT(!m_page_directory || m_page_directory == &page_directory);
InterruptDisabler disabler;
set_page_directory(page_directory);
m_page_directory = page_directory;
#ifdef MM_DEBUG
dbgprintf("MM: map_region_at_address will map VMO pages %u - %u (VMO page count: %u)\n", first_page_index(), last_page_index(), vmobject().page_count());
#endif