IBM Version 52 Computer Accessories User Manual


 
At initialization, a maximum address space is virtually reserved, but not allocated,
to physical memory unless it is needed. The complete address space reserved for
object memory can be divided into young and tenured (old) generations.
New objects are allocated in the Eden. When the Eden fills up, the JVM issues a
scavenge GC or minor collection to move the surviving objects into one of the two
survivor or semi spaces. The JVM does this by first identifying and moving all the
referenced objects in the Eden to one of the survivor spaces. At the end of the
scavenge GC, the Eden is empty (since all the referenced objects are now in the
survivor space) and ready for object allocation.
The scavenge GC's efficiency depends on the amount of referenced objects it has to
move to the survivor space, and not on the size of the Eden. The higher the
amount of referenced objects, the slower the scavenge GC. Studies have, however,
shown that most Java objects live for a short time. Since most objects live for a
short time, one can typically create large Edens.
Referenced objects in the survivor space bounce between the two survivor spaces
at each scavenge GC, until it either becomes unreferenced or the number of
bounces have reached the tenuring threshold. If the tenuring threshold is reached,
that object is migrated up to the old heap.
When the old heap fills up, the JVM issues a Full GC or major collection. In a Full
GC, the JVM has to first identify all the referenced objects. When that is done, the
JVM sweeps the entire heap to reclaim all free memory (for example, because the
object is now dead). Finally, the JVM then moves referenced objects to defragment
the old heap. The efficiency of the Full GC is dependent on the amount of
referenced objects and the size of the heap.
The HotSpot JVM sets aside an area, called permanent generation, to store the
JVM's reflective data such as class and method objects.
HotSpot JVM Garbage Collection Tools
If you want to analyze the Garbage Collection (GC) logs, use some of the tools
described in the following table:
Tool Name For Additional information, Refer To
GCViewer http://www.tagtraum.com/gcviewer.html
Performance Management 65