for i in 0…NB_THREAD
th < Thread.new(i) { |nb|
while site[nb] = pop.liste do
check(site[nb])
end
}
end
for i in 0…NB_THREAD
th[i].join
end
The scrit run several minutes (liste is huge), and the memory consumption
increase a lot during execution.
So i have to find which object is growing up.
How can i do that ? (ie find the size of all object used)
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)
At Wed, 5 Mar 2003 22:39:20 +0900, Cedric Foll wrote:
The scrit run several minutes (liste is huge), and the memory consumption
increase a lot during execution.
So i have to find which object is growing up.
How can i do that ? (ie find the size of all object used)
Objects referred from a thread never be freed until the thread
get freed. You need to discard references to threads after
join.