Make memory type verification helpers accessible to PFN
This commit is contained in:
@@ -19,8 +19,6 @@ namespace MM
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
STATIC XTAPI VOID InitializeMemoryManager(VOID);
|
STATIC XTAPI VOID InitializeMemoryManager(VOID);
|
||||||
|
|
||||||
private:
|
|
||||||
STATIC XTAPI BOOLEAN VerifyMemoryTypeFree(LOADER_MEMORY_TYPE MemoryType);
|
STATIC XTAPI BOOLEAN VerifyMemoryTypeFree(LOADER_MEMORY_TYPE MemoryType);
|
||||||
STATIC XTAPI BOOLEAN VerifyMemoryTypeInvisible(LOADER_MEMORY_TYPE MemoryType);
|
STATIC XTAPI BOOLEAN VerifyMemoryTypeInvisible(LOADER_MEMORY_TYPE MemoryType);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ VOID
|
|||||||
MM::Manager::InitializeMemoryManager(VOID)
|
MM::Manager::InitializeMemoryManager(VOID)
|
||||||
{
|
{
|
||||||
/* Scan memory descriptors provided by the boot loader */
|
/* Scan memory descriptors provided by the boot loader */
|
||||||
ScanMemoryDescriptors();
|
MM::Pfn::ScanMemoryDescriptors();
|
||||||
|
|
||||||
/* Check if there are enough physical pages */
|
/* Check if there are enough physical pages */
|
||||||
if(NumberOfPhysicalPages < MM_MINIMUM_PHYSICAL_PAGES)
|
if(NumberOfPhysicalPages < MM_MINIMUM_PHYSICAL_PAGES)
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ MM::Pfn::ScanMemoryDescriptors(VOID)
|
|||||||
MemoryDescriptor = CONTAIN_RECORD(MemoryMappings, LOADER_MEMORY_DESCRIPTOR, ListEntry);
|
MemoryDescriptor = CONTAIN_RECORD(MemoryMappings, LOADER_MEMORY_DESCRIPTOR, ListEntry);
|
||||||
|
|
||||||
/* Check if memory type is invisible or cached */
|
/* Check if memory type is invisible or cached */
|
||||||
if(VerifyMemoryTypeInvisible(MemoryDescriptor->MemoryType) ||
|
if(MM::Manager::VerifyMemoryTypeInvisible(MemoryDescriptor->MemoryType) ||
|
||||||
(MemoryDescriptor->MemoryType == LoaderHardwareCachedMemory))
|
(MemoryDescriptor->MemoryType == LoaderHardwareCachedMemory))
|
||||||
{
|
{
|
||||||
/* Skip this mapping */
|
/* Skip this mapping */
|
||||||
@@ -69,7 +69,7 @@ MM::Pfn::ScanMemoryDescriptors(VOID)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Check if memory type should be considered as free */
|
/* Check if memory type should be considered as free */
|
||||||
if(VerifyMemoryTypeFree(MemoryDescriptor->MemoryType))
|
if(MM::Manager::VerifyMemoryTypeFree(MemoryDescriptor->MemoryType))
|
||||||
{
|
{
|
||||||
/* Check if this descriptor contains more free pages */
|
/* Check if this descriptor contains more free pages */
|
||||||
if(MemoryDescriptor->PageCount >= FreePages)
|
if(MemoryDescriptor->PageCount >= FreePages)
|
||||||
|
|||||||
Reference in New Issue
Block a user