From 4985b2d1f4c797869c187f57a60aa81198c3f498 Mon Sep 17 00:00:00 2001 From: "Justin C. Miller" Date: Tue, 2 Feb 2021 18:36:28 -0800 Subject: [PATCH] [kernel] fix frame_allocator::allocate return value frame_allocator::allocate was returning the passed-in desired amount of pages, instead of the actual number allocated. --- src/kernel/frame_allocator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kernel/frame_allocator.cpp b/src/kernel/frame_allocator.cpp index 83a47c8..349ba85 100644 --- a/src/kernel/frame_allocator.cpp +++ b/src/kernel/frame_allocator.cpp @@ -70,7 +70,7 @@ frame_allocator::allocate(size_t count, uintptr_t *address) } } - return count; + return n; } kassert(false, "frame_allocator ran out of free frames!");