Do you know where your variables are? | |
PerlMonks |
Re: Re: How to Calculate Memory Needs?by marcos (Scribe) |
on Jun 18, 2002 at 09:15 UTC ( [id://175310]=note: print w/replies, xml ) | Need Help?? |
I'm a bit late in this thread, but I have a similar problem: evaluate the size of a big hash that I have in memory.
I searched perlmonks for some clue on this issue, and I found this thread. I've read your ideas, and I found them very interesting. Anyway I came up with a different approach, and I'd like to share my idea with you so that you can give me feedback. The idea is quite simple: I build the hash and then use Storable::freeze (see module Storable) to freeze it in memory, and then evaluate the length of it. I had this idea reading the man page of Storable module: here is an example from the man page:
What do you think of this approach? marcos
In Section
Seekers of Perl Wisdom
|
|