Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: memory leak

by McA (Priest)
on Jul 27, 2013 at 06:39 UTC ( #1046630=note: print w/ replies, xml ) Need Help??

in reply to memory leak


check out the search functionality of this site. Using search term memory leak gives rather many interesting hits.

Besides of that: Memory leak means that memory is not released after it should be not used anymore. This happens in Perl when the reference counter doesn't drop to 0. And the cause for that are often circular references.

In your program I can't see a memeory leak, but probably others. You will need more memory the bigger the numbers are. This is by design.

A problem you have with Perl is, that Perl doens't give memory back to the OS. So when you check the memory consumption at the beginning and at the end of your function call you will see an increase of Perl's memory footprint. But you don't know if this memory is free for usage of later claims.

Look for the topics mentioned by me and I'm sure you find many informations.

Best regards

Comment on Re: memory leak
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (11)
As of 2015-11-26 15:38 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (701 votes), past polls