mirror of
https://github.com/Pithikos/C-Thread-Pool
synced 2024-11-25 14:59:37 +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")
|
heap_usage=$(echo "$output" | grep "total heap usage")
|
||||||
allocs=$(extract_num "[0-9]* allocs" "$heap_usage")
|
allocs=$(extract_num "[0-9]* allocs" "$heap_usage")
|
||||||
frees=$(extract_num "[0-9]* frees" "$heap_usage")
|
frees=$(extract_num "[0-9]* frees" "$heap_usage")
|
||||||
if (( "$allocs"-"$frees" > 4 )); then
|
if [ "$allocs" != "$frees" ]; then
|
||||||
#if [ "$allocs" != "$frees" ]; then
|
err "Allocated $allocs times but freed only $frees" "$output"
|
||||||
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"
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user