mirror of
https://github.com/Pithikos/C-Thread-Pool
synced 2024-11-22 05:31:18 +03:00
Memore leaks solved
This commit is contained in:
parent
d6d5f3dcd8
commit
c91ab00300
@ -124,10 +124,8 @@ EOF
|
||||
heap_usage=$(echo "$output" | grep "total heap usage")
|
||||
allocs=$(extract_num "[0-9]* allocs" "$heap_usage")
|
||||
frees=$(extract_num "[0-9]* frees" "$heap_usage")
|
||||
if (( "$allocs"-"$frees" > 4 )); then
|
||||
#if [ "$allocs" != "$frees" ]; then
|
||||
msg2="Max 4 leaks are allowed since each pthread might erronoumesly show a leak in valgrind."
|
||||
err "Allocated $allocs times but freed only $frees. $msg2" "$output"
|
||||
if [ "$allocs" != "$frees" ]; then
|
||||
err "Allocated $allocs times but freed only $frees" "$output"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user