lorn has asked for the wisdom of the Perl Monks concerning the following question:

Hi, monks!

I have a question, in my work, exists a program in perl, and that program index the document files ( it a google desktop like ) and when this program running, memory is go down gradually until go to the swap, after the program finish, the memory it does not gain freedom, why? i have a function free like ( C ) for perl? or my Operation System ( linux ) it crazy? hehe Thanks for help, and sorry for the bad english.

Lorn
-http://lornlab.no-ip.com-
-www.slackwarezine.com.br-

Replies are listed 'Best First'.
Re: Memory x Perl
by liverpole (Monsignor) on Apr 05, 2006 at 17:42 UTC
    Hi lorn,

    I'm afraid you will need to supply more information.  For example:

    • How are you seeing that the program does not "gain freedom"?
    • Are you sure the program finishes?  Or is it being run, perhaps, by another process which does NOT finish?
    • Can you give us some idea of exactly what is happening in the Perl program?

    Unless you provide more specific details, it's quite difficult to narrow down what the problem might be.


    s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/
      How are you seeing that the program does not "gain freedom"?
      I thought that I had in perl one function like 'free' of the C, and that I needed this function to liberate the memory, but the 2 reply ( moklevat ) show me a good site and i understand, thanks all

      Lorn
      -http://lornlab.no-ip.com-
      -www.slackwarezine.com.br-

Re: Memory x Perl
by moklevat (Priest) on Apr 05, 2006 at 18:11 UTC
    Hi Lorn. Are you certain that the memory is not just buffered? Linux may not show the memory as "free" under the output of free or in top after a process has run because the memory is cached. However, that does not mean it is "used" and not available for a new process.

    Here is an explanation.

Re: Memory x Perl
by wazoox (Prior) on Apr 06, 2006 at 11:40 UTC
    If the program scans the disk, then maybe the memory is used by the disk cache. Linux always tend to fill memory with the disk cache as much as possible.