Review Request JDK-8164512: Replace ClassLoader use of finalizer with phantom reference to unload native library

mandy chung mandy.chung at
Mon Oct 9 20:17:36 UTC 2017

David, Peter, Alan

The VM has a fast path to search the symbol from first for 
bootstrap loader.  That was the case I mostly concern about performance 
and it's not impacted by this change.   Also I consulted with Claes on 
the performance impact.   I took your suggestion and made 
systemNativeLibraries and nativeLibraries volatile.

Updated webrev:


On 10/9/17 1:20 AM, Alan Bateman wrote:
> Alternatively change nativeLibraries and systemNativeLibraries to 
> volatile so the synchronization is only needed to initialize them. 
> Otherwise this version (webrev.03) looks good to me.
> -Alan

More information about the core-libs-dev mailing list