MetaSpace and StackMapTable

john bergin john.bergin at
Wed Jun 10 20:03:36 UTC 2020

Hi all.

I'm generating a bunch of classes at run-time with ASM (which automatically
generates StackMapTable attributes) and when all the classes are
loaded the *MethodAll
*(bytecodes, StackMapTable, ...) column from *jmap -clstats *tells me that
all classes account for about 100MB. When I generate the same classes with
ASM but tell it *not* to compute the StackMapTable attributes and I switch
class verification off (-noverify) *MethodAll* reduces to 55MB.

I'm interested to know:
 - does the JVM free memory held in MetaSpace by StackMapTable attributes
after class verification and a full GC? My testing shows it doesn't.
 - is it possible to generate one StackMapTable entry for each method that
would satisfy the verifier? I had a quick look at the code and it doesn't
seem possible *ClassVerifier::verify_stackmap_table *


More information about the discuss mailing list