use GTop; my $gtop = GTop->new; my $before = $gtop->proc_mem($$)->rss; # initialize your data structure here my $after = $gtop->proc_mem($$)->rss; print "diff: ",$after-$before, " bytes\n";
As the Guide says, you'll need libgtop installed. It's only a workable solution if you're running a free sort of operating system, however.
In reply to Re: Perl internals: sizes
by chromatic
in thread Perl internals: sizes
by edik
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |