Thanks very much Stas, and the list for the archived info.

On Thu, 2004-02-12 at 02:43, Stas Bekman wrote:
> Mark Maunder wrote:
> > 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?
> 
> Most of the time memory is not freed. Take a look at earlier followups to 
> similar questions from Perrin:
> http://marc.theaimsgroup.com/?l=apache-modperl&m=105899476921061&w=2
> and Doug:
> http://marc.theaimsgroup.com/?l=apache-modperl&m=88913995431169&w=2
> 
> Notice Perrin's note on Apache::SizeLimit and read:
> http://perl.apache.org/docs/1.0/guide/performance.html#Choosing_MaxClients
> 
> 
> __________________________________________________________________
> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com
-- 
Mark Maunder <[EMAIL PROTECTED]>
ZipTree.com


-- 
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