The current default new generation collector requires that the older
generation attached to it be able to guarantee the promotion of every
object in the young gen (the young generation cannot recover from a
promotion failure).
The method contiguous_available() reports the amount of contiguous space
a generation has available for allocations, and is used by the young gen
to see if an older generation will be able to satisfy a full promotion.
The result of contiguous_available() can be overoptimistic for the train:
there can still be a promotion failure, even if the contiguous available
space is larger than DefNew + the two survivor spaces. This is because
the train allocates data in fixed size "cars" (or in oversized cars if
the object is large). Each car allocated is a multiple of a known
fixed size, which allows us to do fast lookups to determine the train
and car number if we're given a heap address.
Several approaches have been considered for how to best this this problem.
Promotion undo appears to be the best option (remove the restriction that
the young generation cannot handle a promotion failure).
See bug 4587723 for some additional information.
Bug 4418952 discusses promotion undo.
Bug 4510946 is a similar bug against the CMS collector.
- relates to
-
JDK-4587723 JCK14 3 lang/EXPR failed not enough memory when Xincgc used. System has 256M Mem
-
- Closed
-