Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: Tracking down memory leaks

by scain (Curate)
on Apr 13, 2005 at 12:58 UTC ( [id://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

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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://447351]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (1)
As of 2024-04-19 00:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found