Since a whole day went by with no answer to this, I'll give you the best I can do (and hopefully spur some discussion on the topic). If I think memory is going to be a concern with an item in my program, I would build a stop point just before that object was created (something in the application that would wait for the user to hit a key). I would (assuming I'm on linuxunixposix) then run top in a second window and wait for the size of my perl process to stabilize after hitting the stop point. Then going back to the script, continue-- all the while keeping an eye on the top window to see what happens.
This is not an exact method, but it's useful for watching for memory leaks and getting a sense for how much memory your larger structures are eating up. I've only used it to watch my scripts as I built destructors into my Tk applications, but never to actually measure the absolute size of a hash.
In reply to Re: How do I find the memory used by a particular hash (NOT including perl itself)?
by ichimunki
in thread How do I find the memory used by a particular hash (NOT including perl itself)?
by meonkeys
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |