aboutsummaryrefslogtreecommitdiff
path: root/tests/memanalyze.pl
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-10-24 08:09:33 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-10-24 08:09:33 +0000
commit69bdb825862fda0ea1a7824674bb78b85adca9c6 (patch)
tree400b90b3efe45d405f4db9c4b44305dbb5c01bc7 /tests/memanalyze.pl
parent4799d39be6d6d1ab30b9f6a99d3e2b6ccc4c1e6f (diff)
produce a single summary of the amount of allocations on -v
Diffstat (limited to 'tests/memanalyze.pl')
-rwxr-xr-xtests/memanalyze.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/memanalyze.pl b/tests/memanalyze.pl
index dff25a8b2..4c1f7630d 100755
--- a/tests/memanalyze.pl
+++ b/tests/memanalyze.pl
@@ -6,6 +6,10 @@
# MEM mprintf.c:1103 realloc(e5718, 64) = e6118
# MEM sendf.c:232 free(f6520)
+my $mallocs=0;
+my $reallocs=0;
+my $strdups=0;
+
while(1) {
if($ARGV[0] eq "-v") {
$verbose=1;
@@ -287,7 +291,8 @@ if($verbose) {
print "Mallocs: $mallocs\n",
"Reallocs: $reallocs\n",
"Strdups: $strdups\n",
- "Frees: $frees\n";
+ "Frees: $frees\n",
+ "Allocations: ".($mallocs + $reallocs + $strdups)."\n";
print "Maximum allocated: $maxmem\n";
}