1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-09 18:50:54 +03:00
occt/tests/bugs/caf/bug114
omy 67a1064eb8 0023818: Extend OSD_MemInfo to report C heap statistics
A new counter MemHeapUsage was added to OSD_MemInfo class to examine program heap size
DRAW command meminfo got new option -h (--heap ) to use new counter data
The following testcases were changed to use new option -h of DRAW command meminfo
myCounters[MemHeapUsage] now will always be refilled every time the OSD_MemInfo::Update() function is called.
Fixed testcases to use meminfo -h instead of meminfo -w to detect memory leaks more properly.
2013-04-12 13:21:13 +04:00

28 lines
595 B
Plaintext
Executable File

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