Map and zero entire PFN database upfront
All checks were successful
Builds / ExectOS (amd64, debug) (push) Successful in 44s
Builds / ExectOS (i686, debug) (push) Successful in 36s
Builds / ExectOS (amd64, release) (push) Successful in 42s
Builds / ExectOS (i686, release) (push) Successful in 34s

This commit is contained in:
2026-02-03 22:32:10 +01:00
parent 7b6e284d39
commit bc391d6e1e

View File

@@ -47,6 +47,10 @@ MM::Pfn::InitializePfnDatabase(VOID)
/* Map the Page Directory and Page Directory Pointer tables for the PFN database */ /* Map the Page Directory and Page Directory Pointer tables for the PFN database */
MM::Pte::MapPPE(MemoryLayout->PfnDatabase, PfnDatabaseEnd, ValidPte); MM::Pte::MapPPE(MemoryLayout->PfnDatabase, PfnDatabaseEnd, ValidPte);
MM::Pte::MapPDE(MemoryLayout->PfnDatabase, PfnDatabaseEnd, ValidPte); MM::Pte::MapPDE(MemoryLayout->PfnDatabase, PfnDatabaseEnd, ValidPte);
MM::Pte::MapPTE(MemoryLayout->PfnDatabase, PfnDatabaseEnd, ValidPte);
/* Zero PFN database virtual space */
RTL::Memory::ZeroMemory(MemoryLayout->PfnDatabase, MemoryLayout->PfnDatabaseSize * MM_PAGE_SIZE);
/* Initialize the color tables */ /* Initialize the color tables */
MM::Colors::InitializeColorTables(); MM::Colors::InitializeColorTables();
@@ -73,11 +77,6 @@ MM::Pfn::InitializePfnDatabase(VOID)
Descriptor = &OriginalFreeDescriptor; Descriptor = &OriginalFreeDescriptor;
} }
/* Map PFN database entries for this range */
MM::Pte::MapPTE(&((PMMPFN)MemoryLayout->PfnDatabase)[Descriptor->BasePage],
(PUCHAR)&((PMMPFN)MemoryLayout->PfnDatabase)[Descriptor->BasePage + Descriptor->PageCount] - 1,
ValidPte);
/* Check if the free memory block that was split is being processed */ /* Check if the free memory block that was split is being processed */
if(Descriptor == &OriginalFreeDescriptor) if(Descriptor == &OriginalFreeDescriptor)
{ {