From: Hugh Sasse Staff Elec Eng Date: 2003-03-05T23:04:34+09:00 Subject: Re: find a memory leak On Wed, 5 Mar 2003, Cedric Foll wrote: > Hi, > > i've got a script which do something like that: > > for i in 0...NB_THREAD > th < Thread.new(i) { |nb| > while site[nb] = pop.liste do > check(site[nb]) > end > } > end I don't know what 'pop' is in this context, but is its accessor thread safe? Have you got a Mutex around it so that only one thread fiddles with it at once? Similarly for the site array. I suspect that could do odd things to memory. > > for i in 0...NB_THREAD > th[i].join > end > > The scrit run several minutes (liste is huge), and the memory consumption Should that be liste.pop then? > increase a lot during execution. Depending on what check does with this data, I'd expect lots of memory to be used, then. > So i have to find which object is growing up. > How can i do that ? (ie find the size of all object used) Not sure about that. > > > Regards > > Hugh