Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: High RAM script takes forever to terminate

by grinder (Bishop)
on Nov 19, 2008 at 22:16 UTC ( [id://724744]=note: print w/replies, xml ) Need Help??


in reply to High RAM script takes forever to terminate

I think you're probably noticing the cost of global destruction. At the very end of the program's execution, the interpreter will go through every single allocation and see if it needs to be DESTROYed. See perlobj, especially the bit at the end.

I don't think you can switch this off. If anything, you can only make it worse :) A perl binary built with -DDEBUGGING will let you set the PERL_DESTRUCT_LEVEL to increasing values, which will exercise the garbage collector more and more severely. This is used to smoke out problems involving memory leaks.

One avenue worth exploring is whether in fact you are leaking a colossal amount of memory during the program's execution, thus leaving 5.4Gb to be cleaned up at the end. Remove the leak, and maybe global destruction will become much cheaper.

• another intruder with the mooring in the heart of the Perl

  • Comment on Re: High RAM script takes forever to terminate

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://724744]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-25 22:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found