Bugfix: Make alloc_at return the start of the virtual memory range instead of the end

This commit is contained in:
apio 2022-11-20 15:11:53 +01:00
parent 33876dcda4
commit cb88630d86

View File

@ -190,6 +190,8 @@ namespace MemoryManager
{
CHECK_PAGE_ALIGNED(virt);
u64 start = virt;
while (count--)
{
u64 frame = TRY(alloc_frame());
@ -197,7 +199,7 @@ namespace MemoryManager
virt += ARCH_PAGE_SIZE;
}
return virt;
return start;
}
Result<void> unmap_owned(u64 virt, usize count)