Loading lib_debug/mem_count.c +9 −10 Original line number Diff line number Diff line Loading @@ -49,6 +49,10 @@ typedef INT64 int64_t; #define FALSE 0 #endif #ifdef RAM_ANALYSIS #include "debug.h" #endif /* How to use the tool notes ========================= Loading Loading @@ -178,10 +182,6 @@ static allocation_list Missing_Allocations; static unsigned int Num_Records_Missing_Alloc_Warnings = 0; #endif #ifdef RAM_ANALYSIS static FILE *mem_analysis_file = NULL; #endif /*-------------------------------------------------------------------* * LOCAL CONST DATA *-------------------------------------------------------------------*/ Loading Loading @@ -911,16 +911,15 @@ size_t mem_count_summary( Counting_Size cnt_size ) void mem_analyze() { unsigned int i; char buffer[1024]; if ( mem_analysis_file == NULL ) { mem_analysis_file = fopen( "mem_analysis.csv", "w" ); } for ( i = 0; i < Num_Records_Cur_RAM; i++ ) { fprintf( mem_analysis_file, "%s:%d,%d;", Current_Allocations[i].name, Current_Allocations[i].lineno, Current_Allocations[i].block_size ); sprintf( buffer, "%s:%d,%d;", Current_Allocations[i].name, Current_Allocations[i].lineno, Current_Allocations[i].block_size ); dbgwrite( buffer, sizeof( char ), strlen( buffer ), 1, "mem_analysis.csv" ); } fprintf( mem_analysis_file, "\n" ); sprintf( buffer, "\n" ); dbgwrite( buffer, sizeof( char ), strlen( buffer ), 1, "mem_analysis.csv" ); return; } Loading Loading
lib_debug/mem_count.c +9 −10 Original line number Diff line number Diff line Loading @@ -49,6 +49,10 @@ typedef INT64 int64_t; #define FALSE 0 #endif #ifdef RAM_ANALYSIS #include "debug.h" #endif /* How to use the tool notes ========================= Loading Loading @@ -178,10 +182,6 @@ static allocation_list Missing_Allocations; static unsigned int Num_Records_Missing_Alloc_Warnings = 0; #endif #ifdef RAM_ANALYSIS static FILE *mem_analysis_file = NULL; #endif /*-------------------------------------------------------------------* * LOCAL CONST DATA *-------------------------------------------------------------------*/ Loading Loading @@ -911,16 +911,15 @@ size_t mem_count_summary( Counting_Size cnt_size ) void mem_analyze() { unsigned int i; char buffer[1024]; if ( mem_analysis_file == NULL ) { mem_analysis_file = fopen( "mem_analysis.csv", "w" ); } for ( i = 0; i < Num_Records_Cur_RAM; i++ ) { fprintf( mem_analysis_file, "%s:%d,%d;", Current_Allocations[i].name, Current_Allocations[i].lineno, Current_Allocations[i].block_size ); sprintf( buffer, "%s:%d,%d;", Current_Allocations[i].name, Current_Allocations[i].lineno, Current_Allocations[i].block_size ); dbgwrite( buffer, sizeof( char ), strlen( buffer ), 1, "mem_analysis.csv" ); } fprintf( mem_analysis_file, "\n" ); sprintf( buffer, "\n" ); dbgwrite( buffer, sizeof( char ), strlen( buffer ), 1, "mem_analysis.csv" ); return; } Loading