Color

For our purposes, a color is an identifying characteristic of a node in either register allocation or in tracing GC algorithms.

In a graph coloring register allocator, variables in use at the same time are represented as adjoining nodes in a graph. The problem of assigning a limited number of registers to a potentially very large set of virtual variables can be reduced to coloring this graph so that no adjoining nodes have the same color. The number of available colors in this case equals the number of available physical registers.

Color can also refer to node characteristics in the search graph in a tracing GC. Mark and sweep typically uses a set of colors to identify which parts of the object graph have been traversed in a GC.

See also ...

Get Oracle JRockit now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.