hi all
i have installed jdk1.5.0 in gentoo linux and having the following problem can any one help me out what should be done
i had just installed gentoo. i am not able to set a java heap size of
more than 2600m on these machines. I m getting following error
--------------------------------------------------
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
--------------------------------------------------

My suspicion is this is a kernel tunable issue, because i have never faced this
issue in fedora stock kernels.

so what might be the problem and i have tries all the latest java software like jdk1.5.0

but same thing is running fine in in fedora with rany amount of ram like 1gb, 2 gb and 1 gb swap but same thing is not even working in Gentoo with 4gb ram and 1 gb swap

so plz help me out

Sounds indeed like the operating system is rejecting request to allocate the 2.5GB of RAM to the JVM initially.
You should probably ask in a specialised Linux forum instead.

On Solaris 7 and Solaris 8 SPARC platforms, the upper limit for this value is approximately 4000m minus overhead amounts. On Solaris 2.6 and x86 platforms, the upper limit is approximately 2000m minus overhead amounts. On Linux platforms, the upper limit is approximately 2000m minus overhead amounts.

source: http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/java.html

Please also see:
http://java.sun.com/j2se/1.5.0/docs/guide/vm/server-class.html
http://java.sun.com/j2se/1.5.0/docs/guide/vm/gc-ergonomics.html

-----------------------------

but same thing is running fine in in fedora with rany amount of ram like 1gb, 2 gb and 1 gb swap but same thing is not even working in Gentoo with 4gb ram and 1 gb swap

How could you have ever set Xmx=2600m on the Fedora box with only 1g/2g physical RAM? Even with 1g of swap, as the last thing you want the JVM to do is start swapping to disk. The GC thrashing the swap would soon bring your application to it's knees.

My guess is that you were running the same code, but with a heap setting < 2000m on the Fedora box? If not can you please elaborate.

Kate

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.