Anonymonk's answer seems to point out a good candidate for your memory problem. My suggestions were rather means to make your code easier to read and understand, which would make debugging easier. I'm sure that creating so many independant perl processes doesn't help though. Adding use strict; and use warnings; can help you solve your memory issues though, as it points out potential mistakes and known pitfalls.

And you're right about $fork, I did not see that it is indeed set. But this demonstrates that your code is hard to read. By the way, the & isn't necessary to call a function, instead, if you want to make a call more explicit, you can use parentheses, like this: Config();.


In reply to Re^3: Memory has been increasing, unable to release memory. by Eily
in thread Memory has been increasing, unable to release memory. by Perl_Love

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, details, 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, summary, 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.