puts "==========="
# Max number of iterations for computing memory leackage
-set i_max 20
+set i_max 10
puts "Amount of iterations is $i_max"
NewDocument D MDTV-Standard
UndoLimit D 10
-restore [locate_data_file OCC114.brep] s
+restore [locate_data_file OCC294.brep] s
set listmem {}
for {set i 1} {${i} <= ${i_max}} {incr i} {
AbortCommand D
# check memory usage (with tolerance equal to half page size)
- lappend listmem [expr [meminfo w] / 1024]
- if { [checktrend $listmem 0 1 "Memory leak detected"] } {
- puts "No memory leak, $i iterations"
- break
- }
+ lappend listmem [meminfo h]
+ checktrend $listmem 0 1 "Memory leak detected"
}