Commit f183d8b2 authored by norvell's avatar norvell
Browse files

Modify smoke_test.sh to include dry-run of memory analysis, finding unbalanced memory alloc/dealloc

parent e9c2f3c6
Loading
Loading
Loading
Loading
Loading
+16 −2
Original line number Diff line number Diff line
@@ -57,8 +57,22 @@ cfg=./scripts/config/ci_linux.json
dly_profile=./scripts/dly_error_profiles/dly_error_profile_10.dat

if [ $BUILD -eq 1 ];then
	# Enable memory macros to find unbalanced memory allocations/deallocations
	# Does not implement full memory analysis
	make clean
	
    # Replace free -> free_, malloc -> malloc_, calloc -> calloc_
	sed -i 's/\bmalloc\b/malloc_/g' lib_{com,enc,dec,rend}/*.c
	sed -i 's/\bcalloc\b/calloc_/g' lib_{com,enc,dec,rend}/*.c
	sed -i 's/\bfree\b/free_/g' lib_{com,enc,dec,rend}/*.c

	# Enable WMOPS and disable DEBUGGING
	sed -i.bak -e "s/\/\*\s*\(#define\s*WMOPS\)\s*\*\//\1/g" lib_com/options.h
	sed -i.bak -e "s/\/\/\s*\(#define\s*WMOPS\)/\1/g"        lib_com/options.h
	sed -i.bak -e "s/\s*\(#define\s*DEBUGGING\)/\/\*\1*\//g" lib_com/options.h

	make all -j

fi

./scripts/runIvasCodec.py -p $cfg -U 1 $WORKERS | tee smoke_test_output.txt
+1 −0
Original line number Diff line number Diff line
@@ -151,6 +151,7 @@
#define FIX_235                                         /* Issue 235: Deallocation of HR filter memory separately for lib_rend (ROM) and lib_util (from file) */
#define ENV_STAB_FIX                                    /* Contribution 23: HQ envelope stability memory fix */
#define STABILIZE_GIPD                                  /* FhG: Contribution 22: gIPD stabilization */
#define FIX_268                                         /* Issue 268: Add low cost dry-run of memory analysis */

/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */
+3 −0
Original line number Diff line number Diff line
@@ -45,6 +45,9 @@
#include "debug.h"
#endif
#include "jbm_jb4_inputbuffer.h"
#ifdef FIX_268
#include "wmc_auto.h"
#endif

#define WMC_TOOL_SKIP