8164512: Replace ClassLoader use of finalizer with phantom reference to unload native library

Reviewed-by: alanb, bchristi, kbarrett, dholmes, plevart
This commit is contained in:
Mandy Chung 2017-11-06 17:48:00 -08:00
parent 46d230c9cc
commit 25032bad54
12 changed files with 484 additions and 163 deletions

View file

@ -765,7 +765,9 @@ public class Runtime {
* with the VM, then the JNI_OnLoad_L function exported by the library
* is invoked rather than attempting to load a dynamic library.
* A filename matching the argument does not have to exist in the file
* system. See the JNI Specification for more details.
* system.
* See the <a href="{@docRoot}/../specs/jni/index.html"> JNI Specification</a>
* for more details.
*
* Otherwise, the filename argument is mapped to a native library image in
* an implementation-dependent manner.
@ -818,7 +820,8 @@ public class Runtime {
* specific prefix, file extension or path. If a native library
* called {@code libname} is statically linked with the VM, then the
* JNI_OnLoad_{@code libname} function exported by the library is invoked.
* See the JNI Specification for more details.
* See the <a href="{@docRoot}/../specs/jni/index.html"> JNI Specification</a>
* for more details.
*
* Otherwise, the libname argument is loaded from a system library
* location and mapped to a native library image in an implementation-