mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 06:32:44 +00:00 
			
		
		
		
	Kernel: Memory purging improvements
This adds the ability for a Region to define volatile/nonvolatile areas within mapped memory using madvise(). This also means that memory purging takes into account all views of the PurgeableVMObject and only purges memory that is not needed by all of them. When calling madvise() to change an area to nonvolatile memory, return whether memory from that area was purged. At that time also try to remap all memory that is requested to be nonvolatile, and if insufficient pages are available notify the caller of that fact.
This commit is contained in:
		
							parent
							
								
									cf2c215def
								
							
						
					
					
						commit
						bc5d6992a4
					
				
					 14 changed files with 655 additions and 62 deletions
				
			
		|  | @ -451,7 +451,7 @@ OwnPtr<Region> MemoryManager::allocate_kernel_region_with_vmobject(const Range& | |||
|     ScopedSpinLock lock(s_mm_lock); | ||||
|     OwnPtr<Region> region; | ||||
|     if (user_accessible) | ||||
|         region = Region::create_user_accessible(range, vmobject, 0, name, access, cacheable); | ||||
|         region = Region::create_user_accessible(nullptr, range, vmobject, 0, name, access, cacheable); | ||||
|     else | ||||
|         region = Region::create_kernel_only(range, vmobject, 0, name, access, cacheable); | ||||
|     if (region) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tom
						Tom