in reply to Re^2: mem usage
in thread mem usage
Woops, what I posted is very buggy. Should be
my @lines; $#lines = 12_000_000; @lines = (); <------ was missing push @lines, $_ while <IN>;
$ perl -e'print "abcdef\n" for 1..11_000_000' | perl -E' $#a=11_000_000; @a=(); push @a, $_ while <>; say int(`ps --no-heading -o vsz $$`/1000) ' 480
480MB for 77MB file with 11 million lines.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: mem usage
by halfcountplus (Hermit) on May 26, 2010 at 18:40 UTC | |
by ikegami (Patriarch) on May 26, 2010 at 19:00 UTC | |
by halfcountplus (Hermit) on May 26, 2010 at 19:12 UTC |
In Section
Seekers of Perl Wisdom