- or download this
use strict;
use warnings;
...
my ( $vmem, $rmem ) = &Display_Mem_Usage($$,$NAME,0);
my $rkeys = scalar keys %RCache;
- or download this
## 1. Failing code:
%RCache = (); keys( %RCache ) = 1020; ## THIS DOESN'T WORK AFTE
+R 1ST PASS
- or download this
## 2. This works:
if ( $rkeys > $dbenv{DB_RMaxkeys} )
...
delete $RCache{$key};
}
}
- or download this
my $etime = sprintf("%.4f",gettimeofday - $stime);
$keys = scalar keys %RCache;
print $DLOG " Exit: Keys:$keys \%RCache Size: ",tota
+l_size(\%RCache)," Time:$etime\n";
}
- or download this
############################# Tue Jan 3 10:49:32 2012
Start. . .
...
## End: VSZ-465472_KB-0 RSS-462424_KB-0 Diff: 458544|458436_KB-0
####### Devel::Size #########
%RCache: 374,120,916 No of keys: 7481
- or download this
############################# Tue Jan 3 10:01:59 2012
Start. . .
...
## End: VSZ-127068_KB-0 RSS-124144_KB-0 Diff: 120140|120156_KB-0
####### Devel::Size #########
%RCache: 21,012,262 No of keys: 5763