< prev index next >

src/java.base/share/classes/java/lang/Runtime.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 637,660 **** * @since 1.4 */ public native long maxMemory(); /** ! * Runs the garbage collector in the Java Virtual Machine. ! * <p> ! * Calling this method suggests that the Java Virtual Machine ! * expend effort toward recycling unused objects in order to ! * make the memory they currently occupy available for reuse ! * by the Java Virtual Machine. ! * When control returns from the method call, the Java Virtual Machine ! * has made a best effort to reclaim space from all unused objects. ! * There is no guarantee that this effort will recycle any particular ! * number of unused objects, reclaim any particular amount of space, or ! * complete at any particular time, if at all, before the method returns or ever. * <p> * The name {@code gc} stands for "garbage ! * collector". The Java Virtual Machine performs this recycling * process automatically as needed, in a separate thread, even if the * {@code gc} method is not invoked explicitly. * <p> * The method {@link System#gc()} is the conventional and convenient * means of invoking this method. --- 637,655 ---- * @since 1.4 */ public native long maxMemory(); /** ! * Runs the garbage collector. ! * Calling this method suggests that the Java virtual machine expend ! * effort toward recycling unused objects in order to make the memory ! * they currently occupy available for quick reuse. When control ! * returns from the method call, the virtual machine has made ! * its best effort to recycle all discarded objects. * <p> * The name {@code gc} stands for "garbage ! * collector". The virtual machine performs this recycling * process automatically as needed, in a separate thread, even if the * {@code gc} method is not invoked explicitly. * <p> * The method {@link System#gc()} is the conventional and convenient * means of invoking this method.
*** 682,691 **** --- 677,712 ---- public void runFinalization() { SharedSecrets.getJavaLangRefAccess().runFinalization(); } /** + * Not implemented, does nothing. + * + * @deprecated + * This method was intended to control instruction tracing. + * It has been superseded by JVM-specific tracing mechanisms. + * This method is subject to removal in a future version of Java SE. + * + * @param on ignored + */ + @Deprecated(since="9", forRemoval=true) + public void traceInstructions(boolean on) { } + + /** + * Not implemented, does nothing. + * + * @deprecated + * This method was intended to control method call tracing. + * It has been superseded by JVM-specific tracing mechanisms. + * This method is subject to removal in a future version of Java SE. + * + * @param on ignored + */ + @Deprecated(since="9", forRemoval=true) + public void traceMethodCalls(boolean on) { } + + /** * Loads the native library specified by the filename argument. The filename * argument must be an absolute path name. * (for example * {@code Runtime.getRuntime().load("/home/avh/lib/libX11.so");}). *
< prev index next >