aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/tester.tcl9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/tester.tcl b/test/tester.tcl
index d9219559c..f485a6de5 100644
--- a/test/tester.tcl
+++ b/test/tester.tcl
@@ -441,8 +441,10 @@ proc finalize_testing {} {
puts "$sqlite_open_file_count files were left open"
incr nErr
}
- if {[sqlite3_memory_used]>0} {
- puts "Unfreed memory: [sqlite3_memory_used] bytes"
+ if {[lindex [sqlite3_status SQLITE_STATUS_MALLOC_COUNT 0] 1]>0 ||
+ [sqlite3_memory_used]>0} {
+ puts "Unfreed memory: [sqlite3_memory_used] bytes in\
+ [lindex [sqlite3_status SQLITE_STATUS_MALLOC_COUNT 0] 1] allocations"
incr nErr
ifcapable memdebug||mem5||(mem3&&debug) {
puts "Writing unfreed memory log to \"./memleak.txt\""
@@ -489,6 +491,9 @@ proc show_memstats {} {
set val [format {now %10d max %10d max-size %10d} \
[lindex $x 1] [lindex $x 2] [lindex $y 2]]
puts "Memory used: $val"
+ set x [sqlite3_status SQLITE_STATUS_MALLOC_COUNT 0]
+ set val [format {now %10d max %10d} [lindex $x 1] [lindex $x 2]]
+ puts "Allocation count: $val"
set x [sqlite3_status SQLITE_STATUS_PAGECACHE_USED 0]
set y [sqlite3_status SQLITE_STATUS_PAGECACHE_SIZE 0]
set val [format {now %10d max %10d max-size %10d} \