mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 17:52:45 +00:00 
			
		
		
		
	Kernel: Move the VM Range class to its own files
This commit is contained in:
		
							parent
							
								
									c11511a0ab
								
							
						
					
					
						commit
						17f076d912
					
				
					 5 changed files with 125 additions and 59 deletions
				
			
		|  | @ -66,20 +66,6 @@ void RangeAllocator::dump() const | |||
|     } | ||||
| } | ||||
| 
 | ||||
| Vector<Range, 2> Range::carve(const Range& taken) | ||||
| { | ||||
|     VERIFY((taken.size() % PAGE_SIZE) == 0); | ||||
| 
 | ||||
|     Vector<Range, 2> parts; | ||||
|     if (taken == *this) | ||||
|         return {}; | ||||
|     if (taken.base() > base()) | ||||
|         parts.append({ base(), taken.base().get() - base().get() }); | ||||
|     if (taken.end() < end()) | ||||
|         parts.append({ taken.end(), end().get() - taken.end().get() }); | ||||
|     return parts; | ||||
| } | ||||
| 
 | ||||
| void RangeAllocator::carve_at_index(int index, const Range& range) | ||||
| { | ||||
|     VERIFY(m_lock.is_locked()); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling