Write barrier

A write barrier is usually a small piece of code generated by the compiler next to that of a field store. This is needed when the semantics of a field store affect other parts of the system. For example, in generational GCs, it is common to use some kind of write barrier to flag which parts of the entire heap have been written to, or "dirtied". This is because the GC not only needs to trace references pointing from a young generation to the old generation, but the other way around as well. Trivially, there would be no performance benefit from generational GC if the entire old space had to be traversed for each nursery collection. Better instead to pay the price of a few extra instructions of write barrier code for each field store. ...

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.