Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: Tracking down memory leaks

by scain (Curate)
on Apr 13, 2005 at 12:58 UTC ( #447351=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Tracking down memory leaks
in thread Tracking down memory leaks

That's what I was thinking too. The fact that memory usage slowly grows until the OS kills it is not good. The files I am processing have fairly short lines and it processes the files line by line in a loop. All of the variables inside that loop should be "reusing" the same space, right? Otherwise, what is the point of scoping at all.

Scott
Project coordinator of the Generic Model Organism Database Project


Comment on Re^3: Tracking down memory leaks
Re^4: Tracking down memory leaks
by Joost (Canon) on Apr 13, 2005 at 13:01 UTC
Re^4: Tracking down memory leaks
by perrin (Chancellor) on Apr 13, 2005 at 13:39 UTC
    All of the variables in that loop will retain their memory between calls and reuse it. However, if you leave that loop, they will still retain that memory. Also, if you load one of them once with 10MB of data, it will stay at that size until perl exits unless you explicitly undef it when you're done with it.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (9)
As of 2014-04-17 01:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (437 votes), past polls