mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 09:42:45 +00:00 
			
		
		
		
	LibJS: Put some more Heap debug logging behind HEAP_DEBUG
This commit is contained in:
		
							parent
							
								
									e31dac3ba4
								
							
						
					
					
						commit
						1dd71bd68f
					
				
					 1 changed files with 6 additions and 2 deletions
				
			
		|  | @ -35,9 +35,9 @@ | |||
| #include <stdio.h> | ||||
| 
 | ||||
| #ifdef __serenity__ | ||||
| #include <serenity.h> | ||||
| #    include <serenity.h> | ||||
| #elif __linux__ | ||||
| #include <pthread.h> | ||||
| #    include <pthread.h> | ||||
| #endif | ||||
| 
 | ||||
| #define HEAP_DEBUG | ||||
|  | @ -229,13 +229,17 @@ void Heap::sweep_dead_cells() | |||
|     } | ||||
| 
 | ||||
|     for (auto* block : empty_blocks) { | ||||
| #ifdef HEAP_DEBUG | ||||
|         dbg() << " - Reclaim HeapBlock @ " << block << ": cell_size=" << block->cell_size(); | ||||
| #endif | ||||
|         m_blocks.remove_first_matching([block](auto& entry) { return entry == block; }); | ||||
|     } | ||||
| 
 | ||||
| #ifdef HEAP_DEBUG | ||||
|     for (auto& block : m_blocks) { | ||||
|         dbg() << " > Live HeapBlock @ " << block << ": cell_size=" << block->cell_size(); | ||||
|     } | ||||
| #endif | ||||
| } | ||||
| 
 | ||||
| void Heap::did_create_handle(Badge<HandleImpl>, HandleImpl& impl) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling