Bugfix: Make alloc_at return the start of the virtual memory range instead of the end
This commit is contained in:
parent
33876dcda4
commit
cb88630d86
@ -190,6 +190,8 @@ namespace MemoryManager
|
|||||||
{
|
{
|
||||||
CHECK_PAGE_ALIGNED(virt);
|
CHECK_PAGE_ALIGNED(virt);
|
||||||
|
|
||||||
|
u64 start = virt;
|
||||||
|
|
||||||
while (count--)
|
while (count--)
|
||||||
{
|
{
|
||||||
u64 frame = TRY(alloc_frame());
|
u64 frame = TRY(alloc_frame());
|
||||||
@ -197,7 +199,7 @@ namespace MemoryManager
|
|||||||
virt += ARCH_PAGE_SIZE;
|
virt += ARCH_PAGE_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return virt;
|
return start;
|
||||||
}
|
}
|
||||||
|
|
||||||
Result<void> unmap_owned(u64 virt, usize count)
|
Result<void> unmap_owned(u64 virt, usize count)
|
||||||
|
Loading…
Reference in New Issue
Block a user