NonStop Server for Java Programmer's Reference (NSJ 4.0+)

Garbage Collection (GC)
This topic discusses implementation-specific information about garbage collection for NonStop Server for
Java 4. The topics are:
General Information on Garbage Collection
Heap Layout
Managing Generation Size
Implementation of Garbage Collector Types
General Information on Garbage Collection
In general, garbage collectors, the various GC algorithms, and modeling in the NonStop Server for Java 4 are
the same as those implemented by Sun Microsystems implements in their Java VM. Accordingly, you should
refer to the Sun Microsystems web site for details about garbage collection. But keep in mind that some of
the information is not applicable to NonStop Server for Java 4. Links to pertinent information (but not all the
information) on the Sun Microsystems web site are:
Tuning Garbage Collection with 1.4.2 Java Virtual Machine
(http://java.sun.com/docs/hotspot/gc1.4.2/)
Turbo-charging the Java HotSpot Virtual Machine, v1.4.x to Improve the Performance and Scalability
of Application Servers by Alka Gupta and Michael Doyle
(http://developer.java.sun.com/developer/technicalArticles/Programming/turbo/)
Improving Java Application Performance and Scalability by Reducing Garbage Collection Times and
Sizing Memory Using JDK 1.4.1 by Nagendra Nagarajayya and J. Steven Mayer
(http://wireless.java.sun.com/midp/articles/garbagecollection2/)
Heap Layout
In NonStop Server for Java 4, the memory is managed in generations (or memory pools) based on objects at
different ages for Java objects. The generations are:
Young (also called new) generation—The Java VM allocates objects in the young generation pool.
Minor garbage collection happens when this young generation is full and the Java VM is unable to
allocate new objects.
Tenured (also called old) generation—The Java VM moves objects that survived minor garbage
collections from the young generation to the old generation.
Permanent generation—Class objects and metadata objects are allocated in permanent generation.
Layout for generations is illustrated in the following figure.
Layout for Generations