|
From: Julian S. <js...@ac...> - 2010-10-25 07:30:11
|
> > Hmm, I'm not sure without further analysis. It might happen if your
> > program has a large number of locks at different addresses and it
> > locks them in a large number of different orders.
>
> What is exactly "a large number of locks at different addresses " :
> Doesn't each lock necessarily have its own address ?
The laog mechanism creates a directed graph, in which the locks are
nodes and an edge from lock A to lock B indicates that lock A must
be taken before lock B (for example).
When I say "the locks are nodes", I mean that nodes in the graph are
the addresses of the locks. If you allocate 100000 objects each with
its own lock and and then do { lock(A); lock(B); unlock(B); unlock(A); }
for a few million randomly chosen pairs (A,B) of those objects, then
you will end up with a graph with 100000 nodes and a few million edges.
What I am wondering is, maybe nodes are not removed from the graph when
memory is freed. So eventually the graph ends up with more and more
nodes. This is just a guess, I should point out.
J
|