Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: How do I find the memory used by a particular hash (NOT including perl itself)?

by QwertyD (Pilgrim)
on Apr 12, 2004 at 21:36 UTC ( [id://344539]=note: print w/replies, xml ) Need Help??


in reply to How do I find the memory used by a particular hash (NOT including perl itself)?

Use the Devel::Size module.

For example, to determine the amount of memory in bytes used by a hash named %hash:

use Devel::Size qw(total_size); my $memory_used = total_size(\%hash);

If the hash contains any references to other variables, the memory those variables use will be added as well.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://344539]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-03-28 20:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found