Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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
Replies are listed 'Best First'.
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.
Re^4: Tracking down memory leaks
by Joost (Canon) on Apr 13, 2005 at 13:01 UTC

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 about the Monastery: (4)
As of 2015-08-02 09:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found
    past polls