mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 19:52:45 +00:00 
			
		
		
		
	Kernel: Use Vector::unstable_remove() when deallocating a region
Process::m_regions is not sorted, so we can use unstable_remove() to avoid shifting the vector contents. :^)
This commit is contained in:
		
							parent
							
								
									f59747a3d8
								
							
						
					
					
						commit
						d0f5b43c2e
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -257,7 +257,7 @@ bool Process::deallocate_region(Region& region) | |||
|         m_region_lookup_cache.region = nullptr; | ||||
|     for (int i = 0; i < m_regions.size(); ++i) { | ||||
|         if (&m_regions[i] == ®ion) { | ||||
|             m_regions.remove(i); | ||||
|             m_regions.unstable_remove(i); | ||||
|             return true; | ||||
|         } | ||||
|     } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling