REDUCING GARBAGE IN JAVA

Authors
Citation
Ce. Mcdowell, REDUCING GARBAGE IN JAVA, ACM SIGPLAN NOTICES, 33(9), 1998, pp. 84-86
Citations number
2
Categorie Soggetti
Computer Science Software Graphycs Programming","Computer Science Software Graphycs Programming
Journal title
Volume
33
Issue
9
Year of publication
1998
Pages
84 - 86
Database
ISI
SICI code
Abstract
One of the important advantages of Java, from a programmers prospectiv e, is the use of garbage collection. One aspect of memory management i n Java is that all objects are created on a garbage collected heap. On ly primitive types, mostly numeric types and references to objects, ar e allocated on the runtime stack. We speculated that a significant num ber of objects behaved like traditional automatic variables, that are normally allocated on the runtime stack. We instrumented a Java virtua l machine to test this hypothesis. The percentage of objects that coul d have been allocated on a stack instead of on the heap ranged from ze ro to possibly as high as 56%, but were generally in the 5-15% range.