mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-08 12:19:37 +03: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:
parent
e3dda4e87b
commit
6ed9cc4717
Notes:
sideshowbarker
2024-07-19 11:26:24 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/6ed9cc47174
@ -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
|
||||
|
@ -91,18 +91,6 @@ public:
|
||||
|
||||
PageDirectory* page_directory() { return m_page_directory.ptr(); }
|
||||
|
||||
void set_page_directory(PageDirectory& page_directory)
|
||||
{
|
||||
ASSERT(!m_page_directory || m_page_directory == &page_directory);
|
||||
m_page_directory = page_directory;
|
||||
}
|
||||
|
||||
void release_page_directory()
|
||||
{
|
||||
ASSERT(m_page_directory);
|
||||
m_page_directory.clear();
|
||||
}
|
||||
|
||||
bool should_cow(size_t page_index) const;
|
||||
void set_should_cow(size_t page_index, bool);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user