--- old/src/java.base/share/classes/java/lang/Runtime.java 2019-05-28 13:47:47.351998361 -0400 +++ new/src/java.base/share/classes/java/lang/Runtime.java 2019-05-28 13:47:47.031996774 -0400 @@ -639,15 +639,18 @@ 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. + * Runs the garbage collector in the Java Virtual Machine. + * + * 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. + * 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. *

* The name {@code gc} stands for "garbage - * collector". The virtual machine performs this recycling + * 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. *

--- old/src/java.base/share/classes/java/lang/System.java 2019-05-28 13:47:48.448003795 -0400 +++ new/src/java.base/share/classes/java/lang/System.java 2019-05-28 13:47:48.132002228 -0400 @@ -1782,14 +1782,15 @@ } /** - * Runs the garbage collector. + * Runs the garbage collector in the Java Virtual Machine. * - * Calling the {@code gc} 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 Java Virtual - * Machine has made a best effort to reclaim space from all discarded - * objects. + * Calling the {@code gc} 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. + * 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. *

* The call {@code System.gc()} is effectively equivalent to the * call: