From 069c51d2e28ceb5b92ebaf96f09c152e66ffadb8 Mon Sep 17 00:00:00 2001 From: "Chloe M." Date: Tue, 14 Jul 2026 22:02:55 +0000 Subject: [PATCH] ptos: pool: Align ByteCount before ChunksNeeded div Signed-off-by: Chloe M. --- service/ptos/ex/pool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/ptos/ex/pool.c b/service/ptos/ex/pool.c index 08e4ca0..dc696ad 100644 --- a/service/ptos/ex/pool.c +++ b/service/ptos/ex/pool.c @@ -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) {