From 622c93fbb38358f294f8eaa8446a17496a3db523 Mon Sep 17 00:00:00 2001 From: Amelia Coutard Date: Thu, 26 May 2022 19:48:56 +0200 Subject: [PATCH] Changed a return statement so that the count returned by the allocator is always the requested count, even if no allocation was performed (in which case, addr == nullptr) --- src/paging.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/paging.cpp b/src/paging.cpp index 530436c..7b96ef4 100644 --- a/src/paging.cpp +++ b/src/paging.cpp @@ -33,7 +33,7 @@ os::paging::page_allocator::block os::paging::page_allocator::allocate(std::uint }; } } - return { .ptr = nullptr, .size = 0 }; + return { .ptr = nullptr, .size = count }; } void os::paging::page_allocator::deallocate(block b) { if (b.size == 0) { return; } -- 2.47.0