You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Benoit Caron <be...@netgraphe.com> on 2000/08/23 16:51:07 UTC

A precision about "All RAM Consumed" in the manual

Hello.

I've read the recommendation in

http://perl.apache.org/guide/control.html#All_RAM_Consumed

to put a sub like that 

 sub UNIVERSAL::AUTOLOAD {
               my $class = shift;
               warn "$class can't \$UNIVERSAL::AUTOLOAD!\n";
             }

to trap the memory leaking that can occur if a sub is undefined. But
where should I put this sub? In all my mod-perl module? In my startup.pl
file?

And, since I'm there, anyone can recommend me a way to hunt the memory
leak of my modules? I've inherit an already well developped site that
leak a lot and I'd like to trap those memory leaking... I'm on Solaris,
if that can help...


-- 
Benoit Caron
Programmeur / Chargé de projet
Netgraphe - La Toile du Québec Communications
benoit.caron@netgraphe.com
- - - - - - - - - - - - - - - - - - - - - - - -
Hi, I'm a signature virus. plz set me as your signature and help me
spread
:)

Re: A precision about "All RAM Consumed" in the manual

Posted by Adi <ad...@certsite.com>.
Benoit Caron wrote:
> 
>  sub UNIVERSAL::AUTOLOAD {
>                my $class = shift;
>                warn "$class can't \$UNIVERSAL::AUTOLOAD!\n";
>              }
> 
> to trap the memory leaking that can occur if a sub is undefined. But
> where should I put this sub? In all my mod-perl module? In my startup.pl
> file?

You can either put it in your startup.pl, or in a <Perl></Perl> section in
your httpd.conf file.  I do the latter.  Putting it in all your mod_perl
modules would be redundant (and might give you compile-time errors).

> 
> And, since I'm there, anyone can recommend me a way to hunt the memory
> leak of my modules? I've inherit an already well developped site that
> leak a lot and I'd like to trap those memory leaking... I'm on Solaris,
> if that can help...

Apache::Leak

-Adi