From: Amelia Coutard Date: Thu, 26 May 2022 17:48:56 +0000 (+0200) Subject: Changed a return statement so that the count returned by the allocator is always... X-Git-Url: https://git.ameliathe1st.gay/?a=commitdiff_plain;h=622c93fbb38358f294f8eaa8446a17496a3db523;p=voyage-au-centre-des-fichiers.git 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) --- 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; }