http://www.perlmonks.org?node_id=316517


in reply to Re: module memory usage
in thread module memory usage

Very cool, I think it shows the size of the code loaded...I wonder if there is a way to get the runtime footprint?

While Tk is worth every byte, It uses:
Memory: main Totals: 52513 bytes | 225 OPs Memory: Tk Totals: 154632 bytes | 1663 OPs Memory: Tk::Adjuster Totals: 99843 bytes | 2000 OPs Memory: Tk::Balloon Totals: 212545 bytes | 2939 OPs Memory: Tk::BrowseEntry Totals: 126060 bytes | 2519 OPs Memory: Tk::Canvas Totals: 22194 bytes | 244 OPs Memory: Tk::CursorControl Totals: 161874 bytes | 2843 OPs Memory: Tk::Entry Totals: 122144 bytes | 2324 OPs Memory: Tk::ItemStyle Totals: 6995 bytes | 91 OPs Memory: Tk::JPEG Totals: 1911 bytes | 1 OPs Memory: Tk::Label Totals: 1824 bytes | 11 OPs Memory: Tk::LabEntry Totals: 4822 bytes | 77 OPs Memory: Tk::MListbox Totals: 214159 bytes | 3940 OPs Memory: Tk::Menu Totals: 193278 bytes | 4004 OPs Memory: Tk::Pixmap Totals: 2601 bytes | 6 OPs Memory: Tk::ROText Totals: 8104 bytes | 127 OPs Memory: Tk::Scrollbar Totals: 31046 bytes | 472 OPs Grand Total: 1416545
And running the above and using taskman (win32) to view the footprint, it give ~8megs (base perl takes an extra 1.7m)...(unless my poor math skills have affected my thinking ;-)