mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 16:22:43 +00:00 
			
		
		
		
	Kernel: Simplify PhysicalPage construction.
There was some leftover cruft from the times when PhysicalPage was allocated using different allocators depending on lifetime.
This commit is contained in:
		
							parent
							
								
									356babaf96
								
							
						
					
					
						commit
						1f8f739ea2
					
				
					 1 changed files with 1 additions and 3 deletions
				
			
		|  | @ -4,9 +4,7 @@ | |||
| 
 | ||||
| NonnullRefPtr<PhysicalPage> PhysicalPage::create(PhysicalAddress paddr, bool supervisor, bool may_return_to_freelist) | ||||
| { | ||||
|     void* slot = kmalloc(sizeof(PhysicalPage)); | ||||
|     new (slot) PhysicalPage(paddr, supervisor, may_return_to_freelist); | ||||
|     return adopt(*(PhysicalPage*)slot); | ||||
|     return adopt(*new PhysicalPage(paddr, supervisor, may_return_to_freelist)); | ||||
| } | ||||
| 
 | ||||
| PhysicalPage::PhysicalPage(PhysicalAddress paddr, bool supervisor, bool may_return_to_freelist) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling