Kernel: Implement MemoryRegion pinning

This allows process to pin a MemoryRegion into users memory space for
syscall duration without allowing user to munmap the region.
This commit is contained in:
2025-04-22 04:30:07 +03:00
parent 808c97020a
commit d54489bbcb
3 changed files with 12 additions and 2 deletions

View File

@@ -13,6 +13,7 @@ namespace Kernel
MemoryRegion::~MemoryRegion()
{
ASSERT(m_pinned_count == 0);
if (m_vaddr)
m_page_table.unmap_range(m_vaddr, m_size);
}