You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "vegan.star" <ve...@bol.com.br> on 2000/08/16 03:39:37 UTC

Memory Leak

    I have some mod_perl modules. I suspect that it has a memory 
leak. I'm running that in a Sun Solaris 2.6 machine with apache 
1.3.9. I read that exists Apache::Leak to test for leaks.
    How it works?
I have some packages and I put into them like this:

package package_name;
use Apache::Leak;

leak_test{
<global vars>

sub handler
{
 statements
}

sub another_function
{
  statements
}
};

Is it correct? I thought not, because the answers are always no 
leaks.

Anybody can helps me? Another idea to detect the leaks?

Regards,

Alex

 
__________________________________________________________________________
BOL d� 15 viagens GR�TIS para as Olimp�adas!
Desafio BOLimp�adas. Inscreva-se j�! http://desafio.bol.com.br/bolimpiadas
 
 



Re: Memory Leak

Posted by Stas Bekman <st...@stason.org>.
On Tue, 15 Aug 2000, vegan.star wrote:

>     I have some mod_perl modules. I suspect that it has a memory 
> leak. I'm running that in a Sun Solaris 2.6 machine with apache 
> 1.3.9. I read that exists Apache::Leak to test for leaks.
>     How it works?
> I have some packages and I put into them like this:
> 
> package package_name;
> use Apache::Leak;
> 
> leak_test{
> <global vars>
> 
> sub handler
> {
>  statements
> }
> 
> sub another_function
> {
>   statements
> }
> };
> 
> Is it correct? I thought not, because the answers are always no 
> leaks.
> 
> Anybody can helps me? Another idea to detect the leaks?

Well yes,
http://thingy.kcilink.com/modperlguide/debug/How_can_I_find_out_if_a_mod_perl.html
but Apache::Leak is not an easy thing to use for leakage detection, since
manytimes what's reported as a leakage is in fact a Perl internal
optimization.

Look at the end of the section from the above link and use the
Apache::Status module with StatusLexInfo option enabled -- this should
reveal more info. See the manpage for more info.

BTW, Solaris has been known to have memory leakages in its C libraries,
but I'm not sure whether it's still true. I think it was prior to 2.6. I
don't use Solaris so I cannot confirm, but I remember the reports about
this from the previous years.

_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide 
mailto:stas@stason.org   http://apachetoday.com http://jazzvalley.com
http://singlesheaven.com http://perlmonth.com   perl.org   apache.org