Jump to content

Talk:Tracing garbage collection

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Root set

[edit]

The article always talks about a root set but does not explain which objects are considered living in the root set. Are this the Objects that are created in the first program routine like main?

What about objects in the root set which reference other objects in the root set or can only objects that aren't referenced by other objects be a part of the root set? If so, how do you distinguish non reachable objects from root set objects?

--91.249.82.6 (talk) 18:15, 13 August 2019 (UTC)[reply]

Second line of the first section: "A distinguished set of roots: objects that are assumed to be reachable. Typically, these include all the objects referenced from anywhere in the call stack (that is, all local variables and parameters in the functions currently being invoked), and any global variables." SKWJ (talk) 01:59, 14 August 2019 (UTC)[reply]

Tri-color marking example

[edit]

The image example for the tri-color marking algorithm is needlessly confusing. The sets are already named after the colors white, grey and black, but the image uses the colors white, yellow and blue and then refers to boxes on the side to tell you which set they belong in, but the circles in the boxes aren't colored.
I'm not sure I'm the right person to change it, but I might give it a try if no one else swaps it with anything clearer. 2A02:A466:A997:0:8439:5BDC:C931:A5FC (talk) 17:00, 23 January 2024 (UTC)[reply]