Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: memory leak

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


in reply to memory leak

Hi,

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
McA


Comment on Re: memory leak
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2014-11-27 03:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (178 votes), past polls