src/java.rmi/share/classes/sun/rmi/transport/GC.java

Print this page
rev 13995 : 8153286: Move sun.misc.GC to java.rmi ( sun.rmi.transport )
Reviewed-by: alanb, erikj

*** 21,31 **** * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ ! package sun.misc; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.SortedSet; import java.util.TreeSet; --- 21,31 ---- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ ! package sun.rmi.transport; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.SortedSet; import java.util.TreeSet;
*** 36,46 **** * * @author Mark Reinhold * @since 1.2 */ ! public class GC { private GC() { } /* To prevent instantiation */ /* Latency-target value indicating that there's no active target --- 36,46 ---- * * @author Mark Reinhold * @since 1.2 */ ! class GC { private GC() { } /* To prevent instantiation */ /* Latency-target value indicating that there's no active target
*** 80,89 **** --- 80,97 ---- * is no longer strongly reachable may have to be inspected multiple times * before it can be reclaimed. */ public static native long maxObjectInspectionAge(); + static { + AccessController.doPrivileged(new PrivilegedAction<Void>() { + public Void run() { + System.loadLibrary("rmi"); + return null; + }}); + } + private static class Daemon extends Thread { public void run() { for (;;) { long l;