-XX:[+|-]HitachiOutOfMemoryAbort (Forced termination option)
- Organization of this page
Format
- -XX:+HitachiOutOfMemoryAbort
-
When OutOfMemoryError occurs, this option outputs the memory dump and executes forced termination.
- -XX:-HitachiOutOfMemoryAbort
-
When OutOfMemoryError occurs, this option does not execute forced termination.
Description
When OutOfMemoryError occurs due to the following reasons, a message is output to the standard output and memory dump or core dump to the current directory, and then forced termination is executed.
-
When Java heap is insufficient
-
When the metaspace area is insufficient
-
When the compressed class space is insufficient
-
When C heap is insufficient in the J2SE class library
Note that when C heap is insufficient during JavaVM processing, the process is forcefully terminated regardless of whether this option is specified.
- Exit code for forced termination
-
The JavaVM exit code for forced termination is as follows:
- In Windows
-
1
- In UNIX
-
6
Note that when executed on UNIX shell (such as sh and csh), 0x80 is added and the exit code becomes 0x86.
- Default value
-
-
-XX:-HitachiOutOfMemoryAbort
-
Examples of output
java.lang.OutOfMemoryError occurred. JavaVM aborted because of specified -XX:+HitachiOutOfMemoryAbort options.
Precautions
-
When the -XX:+HitachiOutOfMemoryStackTrace option is specified, the stack trace is output to the JavaVM log file and then the process is aborted.
-
When this option is specified, the processing of JavaVM termination that is registered in the java.io.File.deleteOnExit method and the java.lang.Runtime.addShutdownHook method is not executed and is forcefully terminated.