I'm creating some fairly big scalars (6 megs) under mod_perl containing
strings, and was doing some memory profiling using Apache::Status. I
noticed at the end of the memory usage for a particular sub, in a
module, there is a 'PADLIST summary', and that there is some hefty
memory usage by certain variables.

I researched padlist and from what I can gather, perl doesn't entirely
free memory when a scalar goes out of scope, in case it needs to
reallocate it. It does this to save having to do another malloc. Is this
correct?

I'm trying to optimise memory usage on my server because I also run
mysql on the same machine (and an upgrade is expensive). Will this
padlist memory get freed up if another process gets hungry? Or is there
something I should be manually doing to my scalars before they go out of
scope? And if I do do this manual something, will I take a performance
hit if that scalar gets re-used frequently in the sub?

Thanks in advance.

Mark.




-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Reply via email to