Work on reducing allocation leaks in read_number(). This is now improved, but not yet satisfactory.
This commit is contained in:
parent
e489d02069
commit
351ca5bd17
9 changed files with 275 additions and 17 deletions
22
unit-tests/allocation-tests/allocation-tester.sh
Executable file
22
unit-tests/allocation-tests/allocation-tester.sh
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
#1/bin/bash
|
||||
|
||||
echo "Case, Summary, Allocated, Deallocated, Not deallocated, Delta Allocated, Delta Deallocated, Delta Not Deallocated"
|
||||
basecase=`echo '' | ../../target/psse 2>&1 | grep Allocation | tr -d '[:punct:]'`
|
||||
bca=`echo ${basecase} | awk '{print $4}'`
|
||||
bcd=`echo ${basecase} | awk '{print $6}'`
|
||||
bcn=`echo ${basecase} | awk '{print $9}'`
|
||||
|
||||
echo "\"Basecase\", \"${basecase}\", ${bca}, ${bcd}, ${bcn}"
|
||||
|
||||
while IFS= read -r form; do
|
||||
allocation=`echo ${form} | ../../target/psse 2>&1 | grep Allocation | tr -d '[:punct:]'`
|
||||
tca=`echo ${allocation} | awk '{print $4}'`
|
||||
tcd=`echo ${allocation} | awk '{print $6}'`
|
||||
tcn=`echo ${allocation} | awk '{print $9}'`
|
||||
|
||||
dca=`echo "${tca} - ${bca}" | bc`
|
||||
dcd=`echo "${tcd} - ${bcd}" | bc`
|
||||
dcn=`echo "${tcn} - ${bcn}" | bc`
|
||||
|
||||
echo "\"${form}\", \"${allocation}\", ${tca}, ${tcd}, ${tcn}, ${dca}, ${dcd}, ${dcn}"
|
||||
done
|
||||
Loading…
Add table
Add a link
Reference in a new issue