Command checktrend is modified to avoid performing check for lists containing less than 5 items, as estimations based on short lists often lead to false positives.
# the check fails and procedure raises error with specified message.
#
# Otherwise the procedure returns false meaning that more iterations are needed.
-# Note that false is returned in any case if length of listval is less than 3.
+# Note that analysis is peformed only if listval contains at least 5 values,
+# thus false is returned unconditionally for shorter lists.
#
# See example of use to check memory leaks in bugs/caf/bug23489
#
proc checktrend {listval delta tolerance message} {
set nbval [llength $listval]
- if { $nbval < 3} {
+ if { $nbval < 5} {
return 0
}
unset t
- # Display the j-th shape
+ # Display the i-th shape
ivtkdisplay b$i
# Display shaded
unset b$i
lappend listmem [meminfo h]
- checktrend $listmem 0 120000 "Memory leak detected"
+ checktrend $listmem 0 1 "Memory leak detected"
}