donald128 has asked for the wisdom of the Perl Monks concerning the following question:
1. Run from command-line perl simple.pl size: 7,282688 share: 2,027520 diff: 5,255168 2. Run under mod_perl size: 54,878208 share: 4,661248 diff: 50,216960 Script simple.pl #!/usr/bin/perl use strict; use warnings; use CGI (); my $cgi = CGI->new; print $cgi->header('text/plain'); use GTop; print "Hello, world!\n"; my $m = GTop->new->proc_mem($$); print "size: ".$m->size."\n"; print "share: ".$m->share."\n"; my $diff = $m->size - $m->share; print "diff: $diff\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can I compute memory taken by a perl script?
by BioLion (Curate) on Oct 22, 2009 at 10:54 UTC | |
|
Re: Can I compute memory taken by a perl script?
by FloydATC (Deacon) on Oct 22, 2009 at 12:49 UTC |