RFR(s): 8025279 metaspace/flags/maxMetaspaceSize throws OOM: out of Compressed Klass space

Jesper Wilhelmsson jesper.wilhelmsson at oracle.com
Thu Sep 26 01:03:11 PDT 2013


The metaspace is not my domain so I may be wrong here, but there are two more 
place where there is a similar check as the ones you have protected with 
using_class_space() in your change.

In Metaspace::get_space_list() and Metaspace::get_chunk_manager(). I believe 
that at least the check in get_space_list could use a similar check. The 
class_space_list is not initialized if !use_class_space(), right?

Mikael Gerdin skrev 26/9/13 9:26 AM:
> Hi
> Please review this small fix for throwing OutOfMermoryError with the correct
> cause string when failing to allocate a Klass.
> The code incorrectly sets the cause string to "Compressed class space" if the
> allocation type is ClassType even if the VM is configured to not use a separate
> compressed class space.
> The fix adds a helper function to determine if a MetadataType would be allocated
> in the compressed class space or not and uses that to figure out what string to
> send and which OOME to throw.
> Webrev: http://cr.openjdk.java.net/~mgerdin/8025279/webrev.0
> Bug link: https://bugs.openjdk.java.net/browse/JDK-8025279

More information about the hotspot-gc-dev mailing list