0023818: Extend OSD_MemInfo to report C heap statistics
[occt.git] / tests / bugs / caf / bug114
CommitLineData
5789daf9 1puts "==========="
2puts "OCC114"
3puts "==========="
4
5# Max number of iterations for computing memory leackage
6set i_max 20
7puts "Amount of iterations is $i_max"
8
9NewDocument D MDTV-Standard
10UndoLimit D 10
11
61c421bf 12restore [locate_data_file OCC294.brep] s
5789daf9 13
14set listmem {}
15for {set i 1} {${i} <= ${i_max}} {incr i} {
16
17 OpenCommand D
18 SetShape D 0:1 s
19 AbortCommand D
20
21 # check memory usage (with tolerance equal to half page size)
67a1064e 22 lappend listmem [meminfo h]
5789daf9 23 if { [checktrend $listmem 0 1 "Memory leak detected"] } {
24 puts "No memory leak, $i iterations"
25 break
26 }
27}