As I said, I want to record the max memory used during program run time.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Devel::Sizeonly measures the memory size one at a time for one particular data structure to measure the total memory size of all data structure used in your script On Unix-like systems,Proc::ProcessTableprovides a nice API for it:Here is a simple script, comparing it with Devel::Size.
It gives:
With
DEVEL::SIZEI’m 104 bytes big.With
Proc::ProcessTableI’m 5357568 bytes big.Note: source of Info: http://www.perlmonks.org/