Commit 639cee4f authored by malenov's avatar malenov
Browse files

fix also MEM_COUNT_DETAILS

parent ccc36a23
Loading
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -2525,9 +2525,6 @@ static ivas_error decodeG192(
        {
            update_wmops();
            update_mem();
#ifdef MEM_COUNT_DETAILS
            export_mem( "mem_analysis.csv" );
#endif
        }
#endif
    }
+5 −5
Original line number Diff line number Diff line
@@ -1147,7 +1147,7 @@ void *mem_alloc(

#ifdef MEM_COUNT_DETAILS
    /* Export heap memory allocation record to the .csv file */
    fprintf( fid_csv_filename, "A,%d,%s,%d,%d\n", update_cnt, ptr_record->name, ptr_record->lineno, ptr_record->block_size );
    fprintf( fid_csv_filename, "A,%ld,%s,%d,%d\n", update_cnt, ptr_record->name, ptr_record->lineno, ptr_record->block_size );
#endif

    if ( ptr_record->frame_allocated != -1 )
@@ -1445,8 +1445,8 @@ allocator_record *get_mem_record( unsigned long *hash, const char *func_name, in
/*-------------------------------------------------------------------*
 * mem_free()
 *
 * This function de-allocatesd the memory block and frees the mphysical memory with free().
 * It also updates actual and average usage of the memory block.
 * This function de-allocates memory blocks and frees physical memory with free().
 * It also updates the actual and average usage of memory blocks.
 *
 * Note: The record is not removed from the list and may be reused later on in mem_alloc()!
 *--------------------------------------------------------------------*/
@@ -1487,7 +1487,7 @@ void mem_free( const char *func_name, int func_lineno, void *ptr )

#ifdef MEM_COUNT_DETAILS
    /* Export heap memory de-allocation record to the .csv file */
    fprintf( fid_csv_filename, "D,%d,%s,%d,%d\n", update_cnt, ptr_record->name, ptr_record->lineno, ptr_record->block_size );
    fprintf( fid_csv_filename, "D,%ld,%s,%d,%d\n", update_cnt, ptr_record->name, ptr_record->lineno, ptr_record->block_size );
#endif

    /* De-Allocate Memory Block */
@@ -1747,7 +1747,7 @@ static void mem_count_summary( void )
    allocator_record *ptr_record, *ptr;

    /* Prepare format string */
    sprintf( format_str, "%%-%ds %%5s %%6s %%-%ds %%20s %%6s ", MAX_FUNCTION_NAME_LENGTH, MAX_PARAMS_LENGTH );
    sprintf( format_str, "%%-%d.%ds %%5.5s %%6.6s %%-%d.%ds %%20.20s %%6.6s ", 50, 50, 50, 50 );

    if ( n_items_wc_intra_frame_heap > 0 )
    {