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:[EMAIL PROTECTED]   http://apachetoday.com http://jazzvalley.com
http://singlesheaven.com http://perlmonth.com   perl.org   apache.org


Reply via email to