mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 18:15:07 +00:00
Kernel: Refactor Region/PageDirectory ownership model.
Make PageDirectory retainable and have each Region co-own the PageDirectory they're mapped into. When unmapped, Region has no associated PageDirectory. This allows Region to automatically unmap itself when destroyed.
This commit is contained in:
parent
afccbe51a4
commit
2f2f28f212
5 changed files with 60 additions and 68 deletions
|
@ -22,7 +22,7 @@ GraphicsBitmap::GraphicsBitmap(Process& process, const Size& size)
|
|||
auto vmo = VMObject::create_anonymous(size_in_bytes);
|
||||
m_client_region = process.allocate_region_with_vmo(LinearAddress(), size_in_bytes, vmo.copyRef(), 0, "GraphicsBitmap (client)", true, true);
|
||||
m_client_region->set_shared(true);
|
||||
m_client_region->commit(process);
|
||||
m_client_region->commit();
|
||||
|
||||
{
|
||||
auto& server = WSEventLoop::the().server_process();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue