RFR 8015391: NPG: With -XX:+UseCompressedKlassPointers OOME due to exhausted metadat,a space could occur when metaspace is almost empty

Coleen Phillimore coleen.phillimore at oracle.com
Thu Jun 20 09:26:13 PDT 2013


Summary: Allocate medium chunks for class metaspace when class loader 
has lots of classes

I originally made class metaspace keep small chunks and not start 
allocating from medium chunks, because I thought with only Klass 
objects, small chunks is enough.  This test has a large set of class 
loaders who have a lot of classes, so allocated thousands of small 
chunks each.  Class loaders with that many classes should start 
allocating from medium chunks, for class metaspace.

I also increased the ClassMediumChunk size to 4k and measured a lot less 
fragmentation waste than 1K or 2K for this test.  Lastly, the 
AppClassLoader instance should have as large of an initial metaspace as 
the bootclass loader.

Tested with vm.quick.testlist and the failing test.

open webrev at http://cr.openjdk.java.net/~coleenp/8015391/
bug link at http://bugs.sun.com/view_bug.do?bug_id=8015391
local bug link https://jbs.oracle.com/bugs/browse/JDK-8015391

Thanks,
Coleen



More information about the hotspot-dev mailing list