mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 14:45:07 +00:00
Kernel: Regions should be mapped into a PageDirectory, not a Process
This patch changes the parameter to Region::map() to be a PageDirectory since that matches how we think about the memory model: Regions are views onto VMObjects, and are mapped into PageDirectories. Each Process has a PageDirectory. The kernel also has a PageDirectory.
This commit is contained in:
parent
2cfc43c982
commit
3dce0f23f4
4 changed files with 9 additions and 9 deletions
|
@ -483,7 +483,7 @@ OwnPtr<Region> MemoryManager::allocate_kernel_region(size_t size, const StringVi
|
|||
region = Region::create_user_accessible(range, name, PROT_READ | PROT_WRITE | PROT_EXEC);
|
||||
else
|
||||
region = Region::create_kernel_only(range, name, PROT_READ | PROT_WRITE | PROT_EXEC);
|
||||
MM.map_region_at_address(*m_kernel_page_directory, *region, range.base());
|
||||
region->map(kernel_page_directory());
|
||||
// FIXME: It would be cool if these could zero-fill on demand instead.
|
||||
if (should_commit)
|
||||
region->commit();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue