Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Thanks for an extremely useful suggestion. I have done this and a lot of the extra results are gone. However, there is still a memory leak. However, now I'm not sure whether it's Date::Manip, or perl.

If I replace the parse in the script above with:
   for (1..100) {
      $date->parse("2010-02-01 01:02:03");
   }
I get the following output:
   leaked SV(0x0x1300100) from /home/sulbeck/local/lib/perl5/5.10.1/Date/Manip/TZ/amnew_00.pm line 44
   leaked RV(0x0x1250200) from /home/sulbeck/local/lib/perl5/5.10.1/Date/Manip/TZ/amnew_00.pm line 44
   leaked SV(0x0x12d0300) from /home/sulbeck/local/lib/perl5/5.10.1/Date/Manip/Date.pm line 1115
   leaked SV(0x0x1310200) from /home/sulbeck/local/lib/perl5/5.10.1/Date/Manip/TZ/amnew_00.pm line 44
   leaked RV(0x0x12d0000) from /home/sulbeck/local/lib/perl5/5.10.1/Date/Manip/TZ.pm line 163
   leaked SV(0x0x1320300) from /home/sulbeck/local/lib/perl5/5.10.1/Date/Manip/TZ/amnew_00.pm line 44
   leaked SV(0x0x12a0100) from /home/sulbeck/local/lib/perl5/5.10.1/Date/Manip/Date.pm line 1115
   leaked SV(0x0x12e0100) from /home/sulbeck/local/lib/perl5/5.10.1/Date/Manip/TZ/amnew_00.pm line 44
   leaked SV(0x0x1320000) from /home/sulbeck/local/lib/perl5/5.10.1/Date/Manip/TZ/amnew_00.pm line 44
   leaked SV(0x0x12f0100) from /home/sulbeck/local/lib/perl5/5.10.1/Date/Manip/TZ/amnew_00.pm line 44
So, even though I've got a couple leaks, it's not leaking at every iteration. It appears that there are a couple of 'one-time-only' leakes, and I'd be willing to ignore them if I can't resolve them in a reasonable amout of time.

Unfortunately, if I just repeatedly parse the same date (i.e. do 1000000 iterations instead of 100) and monitor the size of the perl executable while it is running, it keeps growing.

Since running for 100 iterations shows only the 10 "leaks" above, but running over many iterations shows the executable continually growing, does this indicate that maybe the problem isn't (directly) with Date::Manip? Or is this just wishful thinking?

Thanks

In reply to Re^4: Memory leak question by SBECK
in thread Memory leak question by SBECK

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others making s'mores by the fire in the courtyard of the Monastery: (6)
    As of 2019-05-25 11:45 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Do you enjoy 3D movies?



      Results (152 votes). Check out past polls.

      Notices?
      • (Sep 10, 2018 at 22:53 UTC) Welcome new users!