[Gc] Roots observed in GC stack with threads
lincoln at techhouse.org
Tue Nov 27 13:21:36 PST 2007
On Wed, Nov 28, 2007 at 05:56:01AM +1100, skaller wrote:
> On Mon, 2007-11-26 at 21:48 -0500, Lincoln Quirk wrote:
> > The program is in a complex infinite loop which results in several
> > allocations each iteration. The essence of it is that it's constructing
> > a new node in a linked list on each iteration, but the head is being
> > advanced as fast as the tail. I (fairly strongly) believe I'm updating
> > any pointers to the old head, so that the old elements in the list
> > should not be retained and the collector should properly collect it as
> > execution continues.
> Be good if you could give the actual data structure? You don't say
> whether your linked list is doubly or singly linked.
> If it is doubly linked you probably forgot to NULL out
> the end note 'next' pointer, leaving the tail still reachable.
It's singly linked. The reason I didn't describe it in more depth is
because it's a significantly more complex data structure than a simple
singly linked list.
My question is more about the particular root that the backtrace
identified. Why is this address (that is inside the GC's
thread-initialization stack frames) being considered a root?
More information about the Gc