Object arrays with no referrers.

MacGregor, Duncan (GE Energy Management) duncan.macgregor at ge.com
Thu May 22 16:51:46 UTC 2014


I’ve been doing some work towards reducing the memory footprint of our applications under Java 8  and while picking through heap dumps have come across a large number of java.lang.Object[] instances that have no referrers but are not getting collected. I assume these are something to do with static class data or class loader data and that these roots aren’t being represented in the heap dumps? At least one of these arrays is of over 150000 elements and is entirely filled with nulls, and there are a lot of smaller arrays as well so I would like to find out what is generating them and why.

>From doing some comparisons with LambdaForm enabled versions of Java 7 which do not show this behaviour I’m beginning to think that the metaspace garbage collection is not interacting well with LambdaForm, at least in our case,

I’m also finding a large number of DirectMethodHandles for our call site bootstrap methods, all of which seem to be identical, so I assume we get a new one for every class constant pool? We are loading a significant number of classes in total, and using a large number of class loaders (partly because of OSGi, and partly because we wanted code that is immediately executed as part of the bootstrap process to be executed in temporary Cls so that it and its resources could be Gced away), and I’m wondering if that is contributing to this issue.

Any pointers you guys can give would be extremely useful.

Thanks, Duncan.


More information about the mlvm-dev mailing list