Incremental Collection

Long pauses while garbage collection completes are painful. Even systems that are not normally considered real time appear broken if they stop responding for noticeable intervals.

Any garbage collector can be made slightly preemptable. The collector notices a preemption request, proceeds backward or forward to a point where the memory system is consistent and there is no resource leakage, and allows itself to be preempted. If garbage collection makes some progress when it is preempted, it is an incremental collector. Unfortunately, when it is preempted, the reference graph that the garbage collector works from becomes obsolete and invalid.

If a garbage collector were able to concentrate on finding garbage directly instead ...

Get Real-Time Java™ Platform Programming 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.