Garbage Collection for Memory-constrained Java Virtual Machines

T.S. Abdelrahman and S.R. Pande (Canada)


Compiler and run time support; garbage collection; memory usage optimization.


We describe and evaluate a modified mark-and-sweep garbage collector for Java Virtual Machines (JVMs) that al lows applications to run using less memory. The modified algorithm not only removes from the heap objects that are no longer needed by a program (i.e., garbage), but also ob jects that have not been accessed for a sufficiently long time. The removal of such idling objects affects the reachability of other objects on the heap, and introduces overhead to both execution time and space requirements of the JVM. We de scribe how these issues are addressed, and evaluate the mod ified collector in the Sun Microsystems JDK 1.2.2 using ap plications from the SPECjvm98 benchmark suite. Our re sults indicate that it is possible to execute applications with up to 20% less memory, but at the expense of longer execu tion time. Our modified algorithm is useful when an appli cation is to execute in a memory-constrained environment, where it normally runs out of memory.

Important Links:

Go Back