summaryrefslogtreecommitdiff
path: root/Kernel/MemoryManager.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2018-11-01 13:21:02 +0100
committerAndreas Kling <awesomekling@gmail.com>2018-11-01 13:21:02 +0100
commitfce81d376c73e79093df3ae0560e5d8f288eae43 (patch)
tree785f4a511841f666fda6c99e3a8fdf1725a6e9cd /Kernel/MemoryManager.cpp
parent3e532ac7b6ffeb5c0b0034a7fb2035c4c5756b25 (diff)
downloadserenity-fce81d376c73e79093df3ae0560e5d8f288eae43.zip
Move Region and Subregion out of Process and make them free classes.
Diffstat (limited to 'Kernel/MemoryManager.cpp')
-rw-r--r--Kernel/MemoryManager.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Kernel/MemoryManager.cpp b/Kernel/MemoryManager.cpp
index 74225b2fc7..a12bf28093 100644
--- a/Kernel/MemoryManager.cpp
+++ b/Kernel/MemoryManager.cpp
@@ -234,7 +234,7 @@ void MemoryManager::flushTLB(LinearAddress laddr)
asm volatile("invlpg %0": :"m" (*(char*)laddr.get()));
}
-void MemoryManager::map_region_at_address(dword* page_directory, Process::Region& region, LinearAddress laddr, bool user_allowed)
+void MemoryManager::map_region_at_address(dword* page_directory, Region& region, LinearAddress laddr, bool user_allowed)
{
InterruptDisabler disabler;
auto& zone = *region.zone;
@@ -282,7 +282,7 @@ LinearAddress MemoryManager::allocate_linear_address_range(size_t size)
return laddr;
}
-byte* MemoryManager::create_kernel_alias_for_region(Process::Region& region)
+byte* MemoryManager::create_kernel_alias_for_region(Region& region)
{
InterruptDisabler disabler;
auto laddr = allocate_linear_address_range(region.size);
@@ -290,12 +290,12 @@ byte* MemoryManager::create_kernel_alias_for_region(Process::Region& region)
return laddr.asPtr();
}
-void MemoryManager::remove_kernel_alias_for_region(Process::Region& region, byte* addr)
+void MemoryManager::remove_kernel_alias_for_region(Region& region, byte* addr)
{
unmap_range(m_kernel_page_directory, LinearAddress((dword)addr), region.size);
}
-bool MemoryManager::unmapRegion(Process& process, Process::Region& region)
+bool MemoryManager::unmapRegion(Process& process, Region& region)
{
InterruptDisabler disabler;
auto& zone = *region.zone;
@@ -314,7 +314,7 @@ bool MemoryManager::unmapRegion(Process& process, Process::Region& region)
return true;
}
-bool MemoryManager::unmapSubregion(Process& process, Process::Subregion& subregion)
+bool MemoryManager::unmapSubregion(Process& process, Subregion& subregion)
{
InterruptDisabler disabler;
size_t numPages = subregion.size / 4096;
@@ -334,7 +334,7 @@ bool MemoryManager::unmapSubregion(Process& process, Process::Subregion& subregi
return true;
}
-bool MemoryManager::mapSubregion(Process& process, Process::Subregion& subregion)
+bool MemoryManager::mapSubregion(Process& process, Subregion& subregion)
{
InterruptDisabler disabler;
auto& region = *subregion.region;
@@ -357,7 +357,7 @@ bool MemoryManager::mapSubregion(Process& process, Process::Subregion& subregion
return true;
}
-bool MemoryManager::mapRegion(Process& process, Process::Region& region)
+bool MemoryManager::mapRegion(Process& process, Region& region)
{
map_region_at_address(process.m_pageDirectory, region, region.linearAddress, true);
return true;