1501 * that is, it does not complete either normally or abruptly.
1502 * <p>
1503 * The argument serves as a status code. By convention, a nonzero status code
1504 * indicates abnormal termination.
1505 * <p>
1506 * The call {@code System.exit(n)} is effectively equivalent to the call:
1507 * {@snippet :
1508 * Runtime.getRuntime().exit(n)
1509 * }
1510 *
1511 * @implNote
1512 * The initiation of the shutdown sequence is logged by {@link Runtime#exit(int)}.
1513 *
1514 * @param status exit status.
1515 * @see java.lang.Runtime#exit(int)
1516 */
1517 public static void exit(int status) {
1518 Runtime.getRuntime().exit(status);
1519 }
1520
1521 /**
1522 * Runs the garbage collector in the Java Virtual Machine.
1523 * <p>
1524 * Calling the {@code gc} method suggests that the Java Virtual Machine
1525 * expend effort toward recycling unused objects in order to
1526 * make the memory they currently occupy available for reuse
1527 * by the Java Virtual Machine.
1528 * When control returns from the method call, the Java Virtual Machine
1529 * has made a best effort to reclaim space from all unused objects.
1530 * There is no guarantee that this effort will recycle any particular
1531 * number of unused objects, reclaim any particular amount of space, or
1532 * complete at any particular time, if at all, before the method returns or ever.
1533 * There is also no guarantee that this effort will determine
1534 * the change of reachability in any particular number of objects,
1535 * or that any particular number of {@link java.lang.ref.Reference Reference}
1536 * objects will be cleared and enqueued.
1537 *
1538 * <p>
1539 * The call {@code System.gc()} is effectively equivalent to the
1540 * call:
|
1501 * that is, it does not complete either normally or abruptly.
1502 * <p>
1503 * The argument serves as a status code. By convention, a nonzero status code
1504 * indicates abnormal termination.
1505 * <p>
1506 * The call {@code System.exit(n)} is effectively equivalent to the call:
1507 * {@snippet :
1508 * Runtime.getRuntime().exit(n)
1509 * }
1510 *
1511 * @implNote
1512 * The initiation of the shutdown sequence is logged by {@link Runtime#exit(int)}.
1513 *
1514 * @param status exit status.
1515 * @see java.lang.Runtime#exit(int)
1516 */
1517 public static void exit(int status) {
1518 Runtime.getRuntime().exit(status);
1519 }
1520
1521 /**
1522 * Returns whether the AOT system is recording training data.
1523 * @return whether the AOT system is recording training data.
1524 * @since 25
1525 */
1526 public static native boolean AOTIsTraining();
1527
1528 /**
1529 * Will stop the recording of AOT training data.
1530 * @since 25
1531 */
1532 public static native void AOTEndTraining();
1533
1534 /**
1535 * Runs the garbage collector in the Java Virtual Machine.
1536 * <p>
1537 * Calling the {@code gc} method suggests that the Java Virtual Machine
1538 * expend effort toward recycling unused objects in order to
1539 * make the memory they currently occupy available for reuse
1540 * by the Java Virtual Machine.
1541 * When control returns from the method call, the Java Virtual Machine
1542 * has made a best effort to reclaim space from all unused objects.
1543 * There is no guarantee that this effort will recycle any particular
1544 * number of unused objects, reclaim any particular amount of space, or
1545 * complete at any particular time, if at all, before the method returns or ever.
1546 * There is also no guarantee that this effort will determine
1547 * the change of reachability in any particular number of objects,
1548 * or that any particular number of {@link java.lang.ref.Reference Reference}
1549 * objects will be cleared and enqueued.
1550 *
1551 * <p>
1552 * The call {@code System.gc()} is effectively equivalent to the
1553 * call:
|