Increasing Xmx on Jdev

Posted by Steve Racanovic | Posted in | Posted on 10:19 AM

0

I am trying to increase the Xmx value to 1500M on JDev. However when I do so, I get the "Error occurred during initialization of VM Could not reserve enough space for object heap" error. I am on Windows XP and have 4GB of RAM. And have plenty of available RAM.


[sracanov@sracanov-au D]$ jdev -verbose
savedArg0 = D:\Oracle\jdev\111130-prod\jdeveloper\jdev\bin\jdev.exe
VM to launch D:\Oracle\jdev\111130-prod\jdk160_18\jre\bin\client\jvm.dll
Restarting the launcher with the 64bit version
Reading exe header from jvm.dll, Machine=14c
JNI Option: -Xmx1500M
JNI Option: -Xverify:none
JNI Option: -XX:MaxPermSize=256M
JNI Option: -Xbootclasspath/p:../lib/lwawt.jar
JNI Option: -Dsun.awt.keepWorkingSetOnMinimize=true
JNI Option: -Dsun.java2d.noddraw=true
JNI Option: -XX:+HeapDumpOnOutOfMemoryError
JNI Option: -Doracle.jdeveloper.webservice.showAllOwsmPolicyTypes=false
JNI Option: -Doracle.jdeveloper.webservice.hidePropertyOverride=false
JNI Option: -Dsun.awt.disablegrab=true
JNI Option: -Dide.startingArg0=D:\Oracle\jdev\111130-prod\jdeveloper\jdev\bin\jdev.exe
JNI Option: -Dide.startingArg1=-verbose
JNI Option: -Dide.launcherProcessId=2516
JNI Option: -Dide.config_pathname=D:\Oracle\jdev\111130-prod\jdeveloper\jdev\bin\jdev.conf
JNI Option: -Dide.startingcwd=D:\Oracle\jdev\111130-prod\jdeveloper\jdev\bin
JNI Option: -Dide.shell.enableFileTypeAssociation=D:\Oracle\jdev\111130-prod\jdeveloper\jdev\bin\jdev.exe
JNI Option: -Dide.pref.dir.base=C:\Documents and Settings\sracanov\Application Data
JNI Option: -Dide.work.dir.base=D:\My Contents
JNI Option: -Djava.class.path=..\..\ide\lib\ide-boot.jar
JVM path is D:\Oracle\jdev\111130-prod\jdk160_18\jre\bin\client\jvm.dll
Error occurred during initialization of VM
Could not reserve enough space for object heap

Sun JDK needs a contiguous address space to allocate memory.
On the other hand, JRockit does not need a contiguous address space.

So, if I use JRockit as JDK, and then run JDeveloper with -Xmx1500M it works.

[sracanov@sracanov-au D]$ jdev -verbose
savedArg0 = D:\Oracle\jdev\111130-prod\jdeveloper\jdev\bin\jdev.exe
VM to launch D:\Oracle\appserver\owls\10.3.1.0\jrockit_160_05_R27.6.2-20\jre\bin\jrockit\jvm.dll
Restarting the launcher with the 64bit version
Reading exe header from jvm.dll, Machine=14c
JNI Option: -Xmx1500M
JNI Option: -Xverify:none
JNI Option: -XX:MaxPermSize=256M
JNI Option: -Xbootclasspath/p:../lib/lwawt.jar
JNI Option: -Dsun.awt.keepWorkingSetOnMinimize=true
JNI Option: -Dsun.java2d.noddraw=true
JNI Option: -XX:+HeapDumpOnOutOfMemoryError
JNI Option: -Doracle.jdeveloper.webservice.showAllOwsmPolicyTypes=false
JNI Option: -Doracle.jdeveloper.webservice.hidePropertyOverride=false
JNI Option: -Dsun.awt.disablegrab=true
JNI Option: -Dide.startingArg0=D:\Oracle\jdev\111130-prod\jdeveloper\jdev\bin\jdev.exe
JNI Option: -Dide.startingArg1=-verbose
JNI Option: -Dide.launcherProcessId=2400
JNI Option: -Dide.config_pathname=D:\Oracle\jdev\111130-prod\jdeveloper\jdev\bin\jdev.conf
JNI Option: -Dide.startingcwd=D:\Oracle\jdev\111130-prod\jdeveloper\jdev\bin
JNI Option: -Dide.shell.enableFileTypeAssociation=D:\Oracle\jdev\111130-prod\jdeveloper\jdev\bin\jdev.exe
JNI Option: -Dide.pref.dir.base=C:\Documents and Settings\sracanov\Application Data
JNI Option: -Dide.work.dir.base=D:\My Contents
JNI Option: -Djava.class.path=..\..\ide\lib\ide-boot.jar
JVM path is D:\Oracle\appserver\owls\10.3.1.0\jrockit_160_05_R27.6.2-20\jre\bin\jrockit\jvm.dll
[WARN ] -XX:MaxPermSize=256M is not a valid VM option. Ignoring
[WARN ] -XX:+HeapDumpOnOutOfMemoryError is not a valid VM option. Ignoring
log4j:WARN No appenders could be found for logger (org.apache.commons.httpclient.HttpClient).
log4j:WARN Please initialize the log4j system properly.

Relevant Links:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4358809
http://java.sun.com/docs/hotspot/HotSpotFAQ.html#gc_heap_32bit
http://blogs.oracle.com/jrockit/2008/09/how_to_get_almost_3_gb_heap_on_windows.html