pierre's Journal http://use.perl.org/~pierre/journal/ pierre's use Perl Journal en-us use Perl; is Copyright 1998-2006, Chris Nandor. Stories, comments, journals, and other submissions posted on use Perl; are Copyright their respective owners. 2012-01-25T02:28:47+00:00 pudge pudge@perl.org Technology hourly 1 1970-01-01T00:00+00:00 pierre's Journal http://use.perl.org/images/topics/useperl.gif http://use.perl.org/~pierre/journal/ YAPC::NA talks http://use.perl.org/~pierre/journal/18465?from=rss YAPC::NA program is promising, I can't wait! <br> <br> I will give some feedback from an employer point of view about Perl candidates. Things like "plus points" and "minus points" of Perl developers, distinctive traits of Perl Developers etc. I have two hats: one as a Perl developer and another one as a Manager. I will take advantage of this to compile some (hopefully) useful comments. They may not all be positive, but I hope this will lead to an interesting debate<nobr> <wbr></nobr>:-) <br> <br> I am collecting ideas at the moment to enrich the talk, so if you have subjects you would like a recruiter to talk about, I am interested. pierre 2004-04-24T16:38:18+00:00 journal Circular references and memory leaks are dead! http://use.perl.org/~pierre/journal/15657?from=rss <p> At work, we have a big application on production under mod_perl and Pipeline.pm which is leaking. And when I mean leaking, I mean it is a massive flood. <br> Something had to be done about it. </p><p> I tried several modules available. Devel::Leak and Devel::LeakTrace. They sound interesting, but I already knew there was a memory leak. And Devel::LeakTrace depends on glib and doesn't install on my box. </p><p> Any way, I figured out what I really needed. I want to scan variables for circular references and have a report of where they are. If I can obtain a reference to a circular refence somewhere in perl, then I can dump it and I can figure out what it is. So I released to CPAN Data::Structure::Util which does just that. You give it a data structure and here you go, it tells if there is a circular reference and where it is. I hacked a script to scan through all the global variables and I could find in 5mn exactly where was our memory leak! We fixed it, then I redid the same process and sure enough we found another circular reference generating a memory leak. Then the 3rd time, I found a circular reference in Template Toolkit. But this one is harmless, since TT does break the circular reference when the object is not needed. So it doesn't generate memory leak. <br> We have no more memory leak in our code (or at least nothing significant)! </p><p>I have the feeling we are about to fix many memory leak in CPAN modules in the near future<nobr> <wbr></nobr>:-) </p> pierre 2003-11-08T16:56:04+00:00 journal