Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

hash memory usage?

by pileofrogs (Priest)
on May 10, 2007 at 21:33 UTC ( #614765=perlquestion: print w/replies, xml ) Need Help??

pileofrogs has asked for the wisdom of the Perl Monks concerning the following question:

Is there a way to find out how much memory a hash is consuming? Preferably a fast way?

I don't want to know how many elements the hash has ( scalar(keys(%hash))), I want to know how much memory it consumes. If there is a way to find this without iterating through the entire hash that would be best.

I tried to RTFM, but I didn't find this info. If this is somewhere obvious and I missed it, please tell me where I should have looked.


Replies are listed 'Best First'.
Re: hash memory usage?
by duff (Parson) on May 10, 2007 at 21:43 UTC

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://614765]
Approved by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2021-11-30 02:29 GMT
Find Nodes?
    Voting Booth?

    No recent polls found