mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 13:32:45 +00:00 
			
		
		
		
	Kernel: Store VMObject physical pages in a FixedArray
Let's enforce the invariant that VMObjects don't shrink or grow by storing the pages in a FixedArray.
This commit is contained in:
		
							parent
							
								
									373b8d7cfa
								
							
						
					
					
						commit
						59049ae4b7
					
				
					 3 changed files with 6 additions and 11 deletions
				
			
		|  | @ -15,14 +15,9 @@ VMObject::VMObject(const VMObject& other) | |||
|     MM.register_vmobject(*this); | ||||
| } | ||||
| 
 | ||||
| VMObject::VMObject() | ||||
| { | ||||
|     MM.register_vmobject(*this); | ||||
| } | ||||
| 
 | ||||
| VMObject::VMObject(size_t size) | ||||
|     : m_physical_pages(ceil_div(size, static_cast<size_t>(PAGE_SIZE))) | ||||
| { | ||||
|     m_physical_pages.resize(ceil_div(size, static_cast<size_t>(PAGE_SIZE))); | ||||
|     MM.register_vmobject(*this); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling