Implement initial memory manager infrastructure #24

Open
harraiken wants to merge 169 commits from memmgr into master
2 changed files with 16 additions and 0 deletions
Showing only changes of commit 0658e98436 - Show all commits

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.
*