R
rahulthathoo
Hi
I am trying to load a 600MB file into memory through the below code.
But when I do a top on the system, I see that over the duration of the
program run, the memory usage is 7.5 Gigs!! the top command says: VIRT:
7449m and Res: 7.289m - of course I have 8GB of RAM at my disposal. But
the point is why is this happening for a file which is only 600MB in
size. Here is the code:
open UM, MAP_FILE or die "Can't open Usermap.\n";
my %mapHash;
while(<UM>){
@tokens = split(/:/, $_);
$zHashKey = $tokens[0];
@zMovArr = split(/\s/, $tokens[1]);
$mapHash{$zHashKey} = [@zMovArr];
}
close UM;
Thanks for any help.
Rahul
I am trying to load a 600MB file into memory through the below code.
But when I do a top on the system, I see that over the duration of the
program run, the memory usage is 7.5 Gigs!! the top command says: VIRT:
7449m and Res: 7.289m - of course I have 8GB of RAM at my disposal. But
the point is why is this happening for a file which is only 600MB in
size. Here is the code:
open UM, MAP_FILE or die "Can't open Usermap.\n";
my %mapHash;
while(<UM>){
@tokens = split(/:/, $_);
$zHashKey = $tokens[0];
@zMovArr = split(/\s/, $tokens[1]);
$mapHash{$zHashKey} = [@zMovArr];
}
close UM;
Thanks for any help.
Rahul