5 # Max number of iterations for computing memory leackage
7 puts "Amount of iterations is $i_max"
9 NewDocument D MDTV-Standard
12 restore [locate_data_file OCC114.brep] s
15 for {set i 1} {${i} <= ${i_max}} {incr i} {
21 # check memory usage (with tolerance equal to half page size)
22 lappend listmem [expr [meminfo w] / 1024]
23 if { [checktrend $listmem 0 1 "Memory leak detected"] } {
24 puts "No memory leak, $i iterations"