diff --git a/kernel/src/memory/MemoryManager.cpp b/kernel/src/memory/MemoryManager.cpp index 978a0b98..ebfb7b0e 100644 --- a/kernel/src/memory/MemoryManager.cpp +++ b/kernel/src/memory/MemoryManager.cpp @@ -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 unmap_owned(u64 virt, usize count)