Expose the number of available physical pages
All checks were successful
Builds / ExectOS (i686, debug) (push) Successful in 26s
Builds / ExectOS (i686, release) (push) Successful in 28s
Builds / ExectOS (amd64, debug) (push) Successful in 38s
Builds / ExectOS (amd64, release) (push) Successful in 37s

This commit is contained in:
2026-02-25 20:25:50 +01:00
parent bfdb7bc476
commit 0658e98436
2 changed files with 16 additions and 0 deletions

View File

@@ -45,6 +45,7 @@ namespace MM
IN PFN_NUMBER PageFrameIndex,
IN BOOLEAN BeginStandbyList = FALSE);
STATIC XTAPI VOID FreePhysicalPage(IN PMMPTE PointerPte);
STATIC XTAPI PFN_NUMBER GetAvailablePages(VOID);
STATIC XTAPI ULONG_PTR GetHighestPhysicalPage(VOID);
STATIC XTAPI ULONGLONG GetNumberOfPhysicalPages(VOID);
STATIC XTAPI PMMPFN GetPfnEntry(IN PFN_NUMBER Pfn);

View File

@@ -351,6 +351,21 @@ MM::Pfn::FreePhysicalPage(IN PMMPTE PointerPte)
MM::Pfn::DecrementShareCount(PageFrame, PageFrameNumber, FALSE);
}
/**
* Retrieves the number of available physical pages.
*
* @return This routine returns the number of available physical pages.
*
* @since XT 1.0
*/
XTAPI
PFN_NUMBER
MM::Pfn::GetAvailablePages(VOID)
{
/* Return the number of available pages */
return AvailablePages;
}
/**
* Retrieves the highest physical page number (PFN) detected in the system.
*