mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8220238: Enhancing j.l.Runtime/System::gc specification with an explicit 'no guarantee' statement
Reviewed-by: shade, dholmes, mchung, plevart
This commit is contained in:
parent
9e80843829
commit
ab88704c67
2 changed files with 24 additions and 16 deletions
|
@ -1782,14 +1782,17 @@ public final class System {
|
|||
}
|
||||
|
||||
/**
|
||||
* Runs the garbage collector.
|
||||
*
|
||||
* 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.
|
||||
* Runs the garbage collector in the Java Virtual Machine.
|
||||
* <p>
|
||||
* 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.
|
||||
* 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 call {@code System.gc()} is effectively equivalent to the
|
||||
* call:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue