Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Large JVM heap sizes under windows xp?

843811Sep 11 2004 — edited Aug 6 2006
I have a windows XP Pro SP1 box with 2 GB of physical RAM. I am using the latest jdk, 1.4.2_05.

I understand that 32 bit windows by default allows 2 GB address space for each application, permanently reserving 2 GB for the OS. (There are also apparently special builds going back to win2k which have a special mode where applications can address 3 GB and the OS addresses 1 GB; if anyone knows how to turn this mode on under win xp please let me know.)

So, I should be able to allocate ~2 GB to the JVM (the number is slightly less than 2 GB due to overhead associated with each process in windows) using something like
-Xms1900m -Xmx1900m
as command line args to the java command.

But when I try the above it crashes with the error
Error occurred during initialization of VM
Could not reserve enough space for object heap

Experimentally, I found that the maximum value which works on my box is
-Xms1200m -Xmx1200m
which seems way smaller than it ought to be.

Doing a forum search, I found others who report similar issues, e.g.
http://forum.java.sun.com/thread.jsp?forum=136&thread=522506
But I did not find a decent solution or up to date discusssion.

Does anyone know with windows xp pro what the jvm memory limit is?

As part of my sun search, I came across the following old (circa 2000) but interesting bug report:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4358809
I have never heard of the rebase program before. Is it built into windows? Is it safe to use? Anyone ever try the command as described there?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 3 2006
Added on Sep 11 2004
10 comments
332 views