Stop and copy

Stop and copy is a tracing garbage collector technique that partitions the heap into two equally sized halves that are never in use at the same time. The tracing algorithm that computes the live set incrementally moves the live objects to the other heap half during garbage collection, providing the intrinsic property of compaction. After the GC, the other heap half, with the freshly moved objects, is used as the new heap. This algorithm is fairly simple to implement, but obviously wasteful of memory.

See also Tracing garbage collection, Compaction, and Fragmentation.

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.