JDK-6979312 : 1.5.0_24 heap generation size calculation problem
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 5.0u24,6u13
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris,solaris_7
  • CPU: sparc
  • Submitted: 2010-08-23
  • Updated: 2011-07-19
  • Resolved: 2010-11-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other Other
5.0u26-rev b07Fixed 5.0u27Fixed
Related Reports
Duplicate :  
Description
It seems that with 1.5.0_24 (not on 6uXX) there is a heap generation size calculation issue with either of the following commands.

java -Xmx2048m -Xms2048m -XX:PermSize=512m -XX:NewSize=400m -version
java -Xmx2048m -Xms2048m -XX:PermSize=512m -XX:NewSize=400m -XX:MaxNewSize=800m  -version

Error output:
Error occurred during initialization of VM
Could not reserve enough space for object heap

Strangely, this command works fine:
java -Xmx2048m -Xms2048m -XX:PermSize=512m -XX:NewSize=400m -XX:MaxNewSize=400m  -version

All three commands work in JDK 6.   It seems that in 1.5.0_24 it cannot handle a MaxNewSize bigger than NewSize? 

See comments.

Comments
EVALUATION There are two problems in 5.0; first, it does not honour the MaxHeapSize parameter and second, it does not take care of the case when initial heap size is set equal to max heap size.
06-10-2010