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

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 ?

Replies are listed 'Best First'.
Re^3: Threads memory consumption
by Random_Walk (Prior) 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?


    Pereant, qui ante nos nostra dixerunt!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1065736]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2018-05-28 10:41 GMT
Find Nodes?
    Voting Booth?