Initialize the PageAllocator as part of the memory subsystem
Almost there!
This commit is contained in:
		
							parent
							
								
									65513588f8
								
							
						
					
					
						commit
						cf2a6c7f3c
					
				
					 2 changed files with 4 additions and 3 deletions
				
			
		| 
						 | 
					@ -37,8 +37,7 @@ MemoryManager::initialize(const StartupInformation& startupInformation)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    initializeGDT();
 | 
					    initializeGDT();
 | 
				
			||||||
    mFrameAllocator.initialize(startupInformation);
 | 
					    mFrameAllocator.initialize(startupInformation);
 | 
				
			||||||
 | 
					    mPageAllocator.initialize(startupInformation, &mFrameAllocator);
 | 
				
			||||||
    void* page = mFrameAllocator.allocate();
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -13,6 +13,7 @@
 | 
				
			||||||
#include "Descriptors.hh"
 | 
					#include "Descriptors.hh"
 | 
				
			||||||
#include "StartupInformation.hh"
 | 
					#include "StartupInformation.hh"
 | 
				
			||||||
#include "memory/FrameAllocator.hh"
 | 
					#include "memory/FrameAllocator.hh"
 | 
				
			||||||
 | 
					#include "memory/PageAllocator.hh"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace kernel {
 | 
					namespace kernel {
 | 
				
			||||||
| 
						 | 
					@ -25,7 +26,8 @@ struct MemoryManager
 | 
				
			||||||
 | 
					
 | 
				
			||||||
private:
 | 
					private:
 | 
				
			||||||
    x86::GDT mGDT;
 | 
					    x86::GDT mGDT;
 | 
				
			||||||
    kernel::FrameAllocator mFrameAllocator;
 | 
					    FrameAllocator mFrameAllocator;
 | 
				
			||||||
 | 
					    PageAllocator mPageAllocator;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    void initializeGDT();
 | 
					    void initializeGDT();
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue