Add a function ‘valueSize’
It returns the size of value, including all other values and environments reachable from it. It is intended for debugging memory consumption issues.
This commit is contained in:
		
							parent
							
								
									68cf98c4d2
								
							
						
					
					
						commit
						eff120d1b9
					
				
					 4 changed files with 99 additions and 2 deletions
				
			
		|  | @ -95,8 +95,9 @@ struct PrimOp | |||
| struct Env | ||||
| { | ||||
|     Env * up; | ||||
|     unsigned short prevWith; // nr of levels up to next `with' environment
 | ||||
|     bool haveWithAttrs; | ||||
|     unsigned short size; // used by ‘valueSize’
 | ||||
|     unsigned short prevWith:15; // nr of levels up to next `with' environment
 | ||||
|     unsigned short haveWithAttrs:1; | ||||
|     Value * values[0]; | ||||
| }; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue