-XX:[+|-]HitachiReserveSwapSpace (Reserve swap area option)
This option is used for HP-UX.
Format
- -XX:+HitachiReserveSwapSpace
- This option reserves all the maximum swap areas that are required to execute JavaVM.
- -XX:-HitachiReserveSwapSpace
- This option all the maximum swap areas that are required to execute JavaVM are not reserved.
Description
Specify whether to reserve the maximum swap area (corresponding to OS) that is required to execute JavaVM, when invoking JavaVM.
You can calculate the size of the required maximum swap area by the following format:
(-Xmx specified-value)#1+(-XX:MaxPermSize specified-value)#1+(Area storing the code compiled by JIT)#2 |
- #1
- The default values of -Xmx and MaxPermSize are as follows:
- - -Xmx: 64MB
- - MaxPermSize: 64MB
- #2
- In HP-UX (IPF): 128 MB
- Default value
- -XX:-HitachiReserveSwapSpace
Precautions
- The swap area reserved by JavaVM cannot be used (reserved) from other processes. Similarly, even if JavaVM is not using the area, the area cannot be used. Therefore, JavaVM does not stop due to the failure in securing the swap area during the execution of JavaVM.
- When the swap area cannot be reserved, the following message is output to the standard output and the process is terminated.
Error occurred during initialization of VM
Could not reserve enough space for object heap
- Depending upon the value specified in this option, the size of the core, generated when JavaVM terminates abnormally, does not change.
- If this option is not specified in HP-UX, the swap area used by Java on the disk is not allocated when JavaVM starts. In this case, the swap area is allocated during execution as and when required, so the execution might be interrupted if the swap area is insufficient. Therefore, Hitachi recommends that the system manager allocate a swap area greater than the value specified in the -Xmx option on the disk in advance.
Also, if this option is specified, all the swap area used by Java on the disk is allocated when JavaVM starts. In this case, there is no shortfall of the swap area during the execution of the Java programs. However, if you specify an unnecessarily large value in the -Xmx option, note that the swap area cannot be allocated and the following events occur:
- JavaVM fails to start
- Other processes cannot allocate the swap area
You can use the following formula to calculate the size of the swap area allocated when JavaVM starts:
Swap-area-size=Value-of-Xmx-option + Value-of--XX:MaxPermSize-option + 128MB