5.8.2 When C Heap Is Insufficient
When C heap is insufficient, the message output, and dump output or core dump generation is performed in the following order:
-
A message log indicating insufficient C heap is output to the error report file and standard output.
-
If the memory is insufficient during the execution of 1., a simple message is output to the standard output.
-
In UNIX, if the memory is still insufficient during the output of a simple message, output of the message and error log file is interrupted and a core dump is generated.
Each output format is described below.
- Organization of this subsection
(1) Output contents of a message log indicating insufficient C heap
The output format of a message log indicating insufficient C heap is described below. This format is common for the error report file and standard output.
-
In Windows
Exception in thread <ThreadName> java.lang.OutOfMemoryError:requested <n> bytes [ for <message>]. Memory Status ------------- Memory in use: utilization-rate% Physical memory: free-memory-size/total-memory-sizefree Virtual memory: free-memory-size/Total-memory-sizefree Paging file: free-volume/total-volumefree Heap Status ----------- Java-heap-information ----------- Stack Trace ----------- stack-trace JVM Internal Memory Status -------------------------- area-information-managed-by-the-unique-memory-management-function Insufficient memory for malloc. JVM generates core file. -----------
-
In AIX or Linux
Exception in thread <ThreadName> java.lang.OutOfMemoryError: requested <n> bytes [for <message>]. Memory Status ------------- maximum size of data segment soft(current) limit: software-limit-value-acquired-by-getrlimit(RLIMIT_DATA) kbytes (Hexadecimal) hard limit: hardware-limit-value-acquired-by-getrlimit(RLIMIT_DATA) kbytes (Hexadecimal) current end of the heap: value-acquired-by-sbrk(0) JVM allocation size by malloc: memory-size-allocated-to-JavaVM kbytes (Hexadecimal) malloc information total space in arena :mallinfo.arena value number of ordinary blocks :mallinfo.ordblks value number of small blocks :mallinfo.smblks value number of holding blocks :mallinfo.hblks value space in holding block headers :mallinfo.hblkhd value space in small blocks in use :mallinfo.usmblks value space in free small blocks :mallinfo.fsmblks value space in ordinary blocks in use :mallinfo.uordblks value space in free ordinary blocks :mallinfo.fordblks value cost of enabling keep option :mallinfo.keepcost value Heap Status ----------- Java-heap-information ----------- Stack Trace ----------- stack-trace ----------- JVM Internal Memory Status -------------------------- area-information-managed-by-the-unique-memory-management-function
When such a message is output, take appropriate measures such as reducing C heap.
The output contents are as follows:
(2) Output contents of message showing memory insufficiency
If memory becomes insufficient while a message log indicating insufficient C heap is being output, the process cannot be continued. In this case, a simple message in the following format is output to the standard output.
java.lang.OutOfMemoryError:requested <n> bytes for <message>
The output contents are as follows:
Output items |
Description |
---|---|
n |
The size of memory securing requests is output. |
message |
The internal message required by maintenance personnel for investigation is output. |
(3) Output contents of the message indicating core dump generation
If the memory is still insufficient when a simple message is output, output of the message and error log file is interrupted and a core dump is generated. When a core dump is generated, the message in the following format is output in the standard output.
Can't create logs because of memory shortage. Insufficient memory for malloc. JVM generates core file