in reply to How much memory am I using?

Try Devel::Peek and Devel::Size.
An excellent guide on how to use them is in brian_d_foy's Mastering Perl, pp 102-107.

Software speaks in tongues of man; I debug, therefore I code.
Stop saying 'script'. Stop saying 'line-noise'.

Replies are listed 'Best First'.
Re^2: How much memory am I using?
by BrowserUk (Patriarch) on Feb 06, 2008 at 14:54 UTC

    These do not answer the OPs question. Devel::Size will report the size of (some) internal structures, but not the overall program.

    Also, when using it to determine the size of large nested hash/array structures, it can use a substantial amount of memory internal to itself, in order to detect circular references, which can exacerbate problems rather than helping fix them.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.