Implement initial memory manager infrastructure #24

Open
harraiken wants to merge 169 commits from memmgr into master
3 changed files with 3 additions and 5 deletions
Showing only changes of commit 17b5649362 - Show all commits

View File

@@ -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);
}; };

View File

@@ -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)

View File

@@ -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)