NonStop Server for Java 7.0 Programmer's Reference
Figure 2 Layout for generations
The following list describes the various generations:
• Young (also called new) generation—The JVM allocates objects in the young generation pool.
Minor garbage collection happens when this young generation is full and the JVM is unable
to allocate new objects. The young generation also includes two survivor spaces. One survivor
space is empty at any time and serves as a destination for the next GC operation, and which
also copies the collection of any live objects in the Eden and other survivor space. Objects
are copied between survivor spaces in this way until they are old enough to be tenured—copied
to the tenured generation.
• Tenured (also called old) generation—The JVM 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.
The young and tenured generations each have an area called RESERVED, which is allocated at
the initialization and is used when garbage collection does not have sufficient space to satisfy the
allocation request. In the Oracle implementation, the address range for reserved area is reserved
but memory space is not allocated until it is used. Whereas, in NSJ7 implementation, the address
range for reserved area is reserved and memory space is allocated during the initialization.
Managing generation size
Several java command options allow you to manage the initial size and maximum size of the
combined young and tenured generations.
-Xms
Sets the initial size for the combined young and tenured generation. The default
initial size is 64 MB for 32–bit NSJ7, and 1024 MB for 64–bit NSJ7. Smaller
values lead to shorter but more frequent garbage collections, whereas larger values
lead to longer but less frequent garbage collections. For large server applications,
HP recommends that the initial size be equal to the maximum size.
-Xmx
Sets the maximum size for the combined young and tenured generation. The default
maximum size is 64 MB for 32–bit NSJ7, and 1024 MB for 64–bit NSJ7. With
64–bit NSJ7, -Xmx can be set to values greater than 1276 MB (that is around
1.24 GB, which is the maximum heap size for 32–bit NSJ7).
52 Implementation specifics










