mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 11:32:43 +00:00 
			
		
		
		
	LibJS: Show class in SerenityOS mmap name for type-specific allocators
This commit is contained in:
		
							parent
							
								
									b6d4eea7ac
								
							
						
					
					
						commit
						ee3d09f225
					
				
					 4 changed files with 19 additions and 9 deletions
				
			
		|  | @ -18,11 +18,14 @@ | |||
| 
 | ||||
| namespace JS { | ||||
| 
 | ||||
| NonnullOwnPtr<HeapBlock> HeapBlock::create_with_cell_size(Heap& heap, CellAllocator& cell_allocator, size_t cell_size) | ||||
| NonnullOwnPtr<HeapBlock> HeapBlock::create_with_cell_size(Heap& heap, CellAllocator& cell_allocator, size_t cell_size, [[maybe_unused]] char const* class_name) | ||||
| { | ||||
| #ifdef AK_OS_SERENITY | ||||
|     char name[64]; | ||||
|     snprintf(name, sizeof(name), "LibJS: HeapBlock(%zu)", cell_size); | ||||
|     if (class_name) | ||||
|         snprintf(name, sizeof(name), "LibJS: HeapBlock(%zu): %s", cell_size, class_name); | ||||
|     else | ||||
|         snprintf(name, sizeof(name), "LibJS: HeapBlock(%zu)", cell_size); | ||||
| #else | ||||
|     char const* name = nullptr; | ||||
| #endif | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling