|laziness, impatience, and hubris|
way to find module memory usage?by perl-diddler (Chaplain)
|on Jun 06, 2018 at 20:05 UTC||Need Help??|
perl-diddler has asked for the wisdom of the Perl Monks concerning the following question:
I added some testing routines in a prog I have, and added code to disable them unless I select the tests from the command line.
What I want to find out is if disabling it really reduces memory size. FWIW, DEBUG_ENABLED is optimized to a constant, so theoretically, perl should be able to throw away anything in the braces and I should see a smaller package size. Am trying to find out if theory matches reality. :-)
The memory routines I've seen don't seem to allow inspecting the size of a package, especially w/r/t breaking down:
Of course ideally it would be something like this FF extension (showing memory related to this page):
│ ├──19.49 MB (04.40%) -- top(http://perlmonks.org/?node=Seekers of Perl Wisdom, id=9)Anyway, just the code amount is really what I'm interested in, since there aren't any permanent vars in that section, the other vars should just be on the stack.
Seems like there are several related to showing data sizes, and there fairly good tools for measuring cpu usage, but not so much when it comes to code usage...