ptos: pool: Align ByteCount before ChunksNeeded div

Signed-off-by: Chloe M. <chloe@mensia.org>
This commit is contained in:
2026-07-14 22:02:55 +00:00
parent b7edf8341a
commit 069c51d2e2
+1 -1
View File
@@ -132,7 +132,7 @@ PoolAllocateFromPage(USIZE Gran, POOL_PAGE *Page, USIZE ByteCount, PAGE_INFO *In
return NULL;
}
ChunksNeeded = ByteCount / Gran;
ChunksNeeded = ALIGN_UP(ByteCount, Gran) / Gran;
/* Scan the page for free chunks */
for (Idx = 0; Idx < sizeof(Page->Bitmap) * 8; ++Idx) {