Do you know where your variables are? | |
PerlMonks |
Re: Re: BEGIN initialization and memoryby BrowserUk (Patriarch) |
on Jul 23, 2003 at 07:37 UTC ( [id://277066]=note: print w/replies, xml ) | Need Help?? |
Perl never reclaims used memory to your operating system during the course of your program. According to the man that knows, this isn't exactly so, as he explained here. You can actually what this happen in Win32 if you monitor memory usage with the task manager and type the following
After entering that line into the debugger, I can watch the memory for the task grow to close 100 MB, and then fall most of the way back to the 4 MB that it started out as, as $s goes out of scope and its memory is returned to the OS. You could probably do something similar using top under *nix. Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller
In Section
Seekers of Perl Wisdom
|
|