Java uses garbage collection (GC) for the automatic reclamation of computer
memory no longer required by a running application. GC implementations for
Java Virtual Machines (JVM) are typically designed for single processor ma
chines, and do not necessarily perform well for a server program with many
threads running on a multiprocessor. We designed and implemented an on-the-
fly CC, based on the algorithm of Doligez, Leroy and Gonthier [13, 12] (DLG
), for Java in this environment. An on-the-fly collector, a collector that
does not stop the program threads, allows all processors to be utilized dur
ing collection and provides uniform response times. We extended and adapted
DLG for Java (e.g., adding support for weak references) and for modern mul
tiprocessors without sequential consistency, and added performance improvem
ents (e.g., to keep track of the objects remaining to be traced). We compar
ed the performance of our implementation with stop-the-world mark-sweep GC,
Our measurements show that the performance advantage for our collector inc
reases as the number of threads increase and that it provides uniformly low
response times.