Add call stack cleanup
This commit is contained in:
parent
8d5d145d0f
commit
b61b35b812
|
@ -99,8 +99,18 @@ static void cleanup_function_stats(void* item){
|
|||
}
|
||||
}
|
||||
|
||||
static void cleanup_stack_info(void* item){
|
||||
stack_info_t* stack = (stack_info_t*)item;
|
||||
if (stack->stack_path){
|
||||
rvprof_free(stack->stack_path, strlen(stack->stack_path)+1);
|
||||
stack->stack_path = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
// acutal dynamic array implementations:
|
||||
IMPLEMENT_DYNAMIC_ARRAY(region_t, region, INITIAL_REGIONS, cleanup_region_entry)
|
||||
IMPLEMENT_DYNAMIC_ARRAY(symbol_entry_t, symbol, INITIAL_SYMBOLS, cleanup_symbol_entry)
|
||||
IMPLEMENT_DYNAMIC_ARRAY(function_stats_t, function_stats, INITIAL_FUNCTIONS, cleanup_function_stats)
|
||||
IMPLEMENT_DYNAMIC_ARRAY(stack_info_t, stack_info, INITIAL_STACKS, cleanup_stack_info)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue