Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: Threads memory consumption

by mojo2405 (Acolyte)
on Dec 05, 2013 at 09:55 UTC ( #1065736=note: print w/ replies, xml ) Need Help??


in reply to Re: Threads memory consumption
in thread Threads memory consumption

thanks alot ! do you think it will solve my memory consumption problem ?


Comment on Re^2: Threads memory consumption
Re^3: Threads memory consumption
by Random_Walk (Parson) on Dec 05, 2013 at 11:21 UTC

    Without seeing more of your code its impossible to tell.

    I have seen multi threaded code eat all the memory when a large shared hash is first built containing all the work to be done, and the threads are then created. In this way each thread gets a copy of the hash, and your memory usage is terrible. Using a queue you use a lot less memory. If however you have some other code in there leaking memory, then changing the way you call threads is unlikely to solve it.

    Are you using strict and warnings? Do you declare all your variables in the smallest possible scope? Can you create a small test version of your code that shows this memory leaking behaviour?

    Cheers,
    R.

    Pereant, qui ante nos nostra dixerunt!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (12)
As of 2014-08-22 17:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (163 votes), past polls