From eb7997c0372bd2980486148709eae657895ede0c Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Thu, 14 Apr 2016 00:10:48 -0400 Subject: [PATCH] Use startPage, not start, to calculate initial bitmapIndex and bitmapOffset --- src/memory/FrameAllocator.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/memory/FrameAllocator.cc b/src/memory/FrameAllocator.cc index 3dc0a10..c78c60a 100644 --- a/src/memory/FrameAllocator.cc +++ b/src/memory/FrameAllocator.cc @@ -59,8 +59,8 @@ FrameAllocator::reserveRange(u32 start, // Iterators u32 page = startPage; - u32 bitmapIndex = start / pagesPerBitmap; - u8 bitmapOffset = start % pagesPerBitmap; + u32 bitmapIndex = startPage / pagesPerBitmap; + u8 bitmapOffset = startPage % pagesPerBitmap; kstd::printFormat("Reserving %ld pages for memory addresses between 0x%08lX and 0x%08lX\n", endPage - startPage, start, start + length);