Loading tests/memanalyze.pl +23 −1 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ my $mallocs=0; my $reallocs=0; my $strdups=0; my $showlimit; while(1) { if($ARGV[0] eq "-v") { Loading @@ -19,8 +20,15 @@ while(1) { $trace=1; shift @ARGV; } elsif($ARGV[0] eq "-l") { # only show what alloc that caused a memlimit failure $showlimit=1; shift @ARGV; } else { last; } } my $maxmem; Loading @@ -38,6 +46,7 @@ my $file = $ARGV[0]; if(! -f $file) { print "Usage: memanalyze.pl [options] <dump file>\n", "Options:\n", " -l memlimit failure displayed\n", " -v Verbose\n", " -t Trace\n"; exit; Loading @@ -45,6 +54,19 @@ if(! -f $file) { open(FILE, "<$file"); if($showlimit) { while(<FILE>) { if(/^LIMIT.*memlimit$/) { print $_; last; } } close(FILE); exit; } while(<FILE>) { chomp $_; $line = $_; Loading Loading
tests/memanalyze.pl +23 −1 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ my $mallocs=0; my $reallocs=0; my $strdups=0; my $showlimit; while(1) { if($ARGV[0] eq "-v") { Loading @@ -19,8 +20,15 @@ while(1) { $trace=1; shift @ARGV; } elsif($ARGV[0] eq "-l") { # only show what alloc that caused a memlimit failure $showlimit=1; shift @ARGV; } else { last; } } my $maxmem; Loading @@ -38,6 +46,7 @@ my $file = $ARGV[0]; if(! -f $file) { print "Usage: memanalyze.pl [options] <dump file>\n", "Options:\n", " -l memlimit failure displayed\n", " -v Verbose\n", " -t Trace\n"; exit; Loading @@ -45,6 +54,19 @@ if(! -f $file) { open(FILE, "<$file"); if($showlimit) { while(<FILE>) { if(/^LIMIT.*memlimit$/) { print $_; last; } } close(FILE); exit; } while(<FILE>) { chomp $_; $line = $_; Loading