mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 11:52:44 +00:00 
			
		
		
		
	AK: Add global FlatPtr typedef. It's u32 or u64, based on sizeof(void*)
Use this instead of uintptr_t throughout the codebase. This makes it possible to pass a FlatPtr to something that has u32 and u64 overloads.
This commit is contained in:
		
							parent
							
								
									b98d8ad5b0
								
							
						
					
					
						commit
						b1058b33fb
					
				
					 36 changed files with 164 additions and 161 deletions
				
			
		|  | @ -188,7 +188,7 @@ void kfree(void* ptr) | |||
|     ++g_kfree_call_count; | ||||
| 
 | ||||
|     auto* a = (AllocationHeader*)((((u8*)ptr) - sizeof(AllocationHeader))); | ||||
|     uintptr_t start = ((uintptr_t)a - (uintptr_t)BASE_PHYSICAL) / CHUNK_SIZE; | ||||
|     FlatPtr start = ((FlatPtr)a - (FlatPtr)BASE_PHYSICAL) / CHUNK_SIZE; | ||||
| 
 | ||||
|     for (size_t k = start; k < (start + a->allocation_size_in_chunks); ++k) | ||||
|         alloc_map[k / 8] &= ~(1 << (k % 8)); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling