HP-UX HB v13.00 Ch-11 - Software Development

HP-UX Handbook Rev 13.00 Page 94 (of 101)
Chapter 11 Software Development
October 29, 2013
also be done with HPjmeter. An excellent document about this and other tasks is the java
troubleshooting guide at
http://h18012.www1.hp.com/java/support/troubleshooting_guide.html
An out of memory condition in the process heap can be treated the same way as an out of
memory for any other process. The JVM might have hit maxdsiz or ulimit -d while trying to
increase the process heap. But if both values are large enough, it might be that the JVM ran out
of address space. Here is a simplified view of a JVM’s private address space:
t
e
x
t
process
heap
free *1
Java heap and other
mmap() regions
s
t
a
c
k
thread stacks
*1 free for increasing the process heap or more thread stacks
Memory mapped regions will be allocated top down, from the lower end of the process stack
towards the upper end of the process heap. The process heap will grow upwards. The JVM will
run out of memory if the free area between the process heap and the thread stacks is used up. To
check if this happened, you can e.g. use adb on the core file:
$ echo ‘$m ‘ | adb /opt/java1.4/bin/PA_RISC2.0/java core
:
Data: b = 12000 e = 0xB2E0000 f = 1E05C
^^^^^^^^^
MMF: b = 5228D000 e = 5230E000 f = 0xB2EC06C
: ^^^^^^^^
$
By calculating the difference between the start of the first MMF region and the end of the Data
segment, we can find out the free address space that was left. In the above case this is 0x5228d00
- 0xb2e0000 = 0x46fad000 = 1.1 GB.
To provide enough private address space for different Xmx values, the PA-RISC JVM is shipped
with 3 java executables, which are executed depending on the Xmx value, and which use the
quadrants in different ways:
Executable
-Xmx values
Quadrant Usage
private
address
space
Q1
Q2
Q3
Q4
java
< 1500m
text + private data
private
shared
shared
2 GB
java_q3p
1500m 2400m
text + private data
private
private
shared
3 GB