Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
use total size, not resident size
  • Loading branch information
gray committed Sep 2, 2009
1 parent 4224703 commit b712cb3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions t/07_memleak.t
Expand Up @@ -35,12 +35,12 @@ for (@{$p->table}) {
{
my $tree = Tree::Suffix->new();
$tree->insert('aa'..'gg');
my $start = $p->rss;
my $start = $p->size;
for (my $i=0; $i<200; $i++) {
$tree = Tree::Suffix->new();
$tree->insert('aa'..'gg');
}
my $end = $p->rss;
my $end = $p->size;
if ($end - $start > 1_000) {
diag("\nMemory: $start -> $end\nVerify that you have libstree >= 0.4.2");
ok(0, 'new()/insert()');
Expand Down
4 changes: 2 additions & 2 deletions t/11_memleak.t
Expand Up @@ -18,11 +18,11 @@ for (@{$p->table}) {
my $str = "mississippi";
my $tree = Tree::Suffix->new($str);

my $start = $p->rss;
my $start = $p->size;
for (my $i=0; $i<100_000; $i++) {
my @matches = $tree->find('is');
}
my $end = $p->rss;
my $end = $p->size;
if ($end - $start > 1_000) {
diag("Memory leak: $start -> $end");
ok(0, 'find()');
Expand Down

0 comments on commit b712cb3

Please sign in to comment.