RFR: 6543126: Level.known can leak memory

Mandy Chung mandy.chung at oracle.com
Mon Aug 29 20:10:29 UTC 2016


> On Aug 29, 2016, at 6:10 AM, Daniel Fuchs <daniel.fuchs at oracle.com> wrote:
> 
> Here is a new webrev that uses ClassLoaderValue as Peter suggested.
> 
> http://cr.openjdk.java.net/~dfuchs/webrev_6543126/webrev.04/
> 

Looks good in general.

 553         // KnowLevelCLV is used to register custom level instances with

typo: s/KnowLevelCLV/KnownLevelCLV

 568             final Level level;

Nit: perhaps renaming level to customLevel to make it clear what this is.

line 645, 646: s/gced/GC’ed/


> I had to introduce a new private static class (KnownLevelCLV)
> to avoid using lambdas in KnownLevel.add - as CustomLevel.java
> was failing with an InternalError raised in MethodHandles$Lookup
> otherwise.

I agree it’s good to make progress on JDK-6543126.  I think it’d be good to understand how we get to this InternalError during bindCaller.  Can you file a low priority JBS issue to track that?

Mandy



More information about the core-libs-dev mailing list