Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: What are the symptoms of a memory leak?

by samtregar (Abbot)
on Feb 07, 2009 at 07:37 UTC ( #742097=note: print w/replies, xml ) Need Help??


in reply to What are the symptoms of a memory leak?

A "memory leak" is just a bug that causes a program to lose memory. For example, here's some Perl code that leaks memory:

while (1) { my $b; my $a = \$b; $b = \$a; }

If you run that code it will eat all your system memory and then (if you're lucky) die. If you're unlucky your OS might decide to kill something else and cause bad things to happen.

Without seeing your code, or at least getting a good description of it, there's absolutely no way any of use can tell you if you have a memory leak. That could be what's killing your program, but I'd guess not - 300MB isn't very much memory really.

-sam

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2023-04-01 01:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (77 votes). Check out past polls.

    Notices?