From 44f27fad282d516c3ed7fa017d32c7695a765bff Mon Sep 17 00:00:00 2001 From: Aiken Harris Date: Tue, 3 Mar 2026 08:22:31 +0100 Subject: [PATCH] Correct physical memory range detection --- xtoskrnl/mm/pfn.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xtoskrnl/mm/pfn.cc b/xtoskrnl/mm/pfn.cc index ad94f0c..e88ee22 100644 --- a/xtoskrnl/mm/pfn.cc +++ b/xtoskrnl/mm/pfn.cc @@ -1146,6 +1146,10 @@ MM::Pfn::ScanMemoryDescriptors(VOID) PLOADER_MEMORY_DESCRIPTOR MemoryDescriptor; PFN_NUMBER FreePages; + /* Initialize the lowest and highest physical page numbers */ + LowestPhysicalPage = ~0; + HighestPhysicalPage = 0; + /* Initially, set number of free pages to 0 */ FreePages = 0;