English 中文(简体)
jvm heap limit on SUSE
原标题:

I hope you can help me on the problem we have with SUSE and JDK 1.4.x: my suse is PAE enabled with 15Gb RAM. unfotunately jvm cannot allocate more than 1900Mb for heap size. So java -Xmx2048m gives me an error. it seems you had the same problem, did you solve it? I hope so :)

thanks Michelangelo

问题回答

The JVM is limited to a single contiguous block of memory, so although you might be able to tweak a few more MB out of your system by shutting down processes that you don t really need, the only way to see a big increase is to upgrade to a 64 bit Operating System with a 64 bit JRE.

Update: There s a related question on Stack Overflow with some nice answers: What is the Maximum Java Heap Space for SuSE Linux

In JDK 1.4 I think you are out of luck. It s a 32-bit JVM, period. You will need to update to a much newer version of Java.

You should be able to use -mx1960m, but not 2GB indeed. You might want to read http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4435069.

Run multiples JVMs to workaround this "limitation" (but, why do you need that much a heap size for?).

Or update to Java 1.5 to reach the theoretical 4GB limit of a 32-bit JVM which can be much lower in practice (see http://forums.sun.com/thread.jspa?threadID=5207549&start=15). But, again, why do you need that much a heap size for?

just a couple of updates: - on this SUSE machine (where jvm heap max size is 1960m) I can allocate 3.6Gb of heap with several malloc of 10Mb each (C programming). So it sounds quite strange to me. - on another RH4 with same jdk1.4.2 I can allocate: /usr/local/jdks/j2sdk1.4.2_16/bin/java -Xmx2648m with success!! do you know my real RAM on this RH4? just 1024Mb!!! - both SUSE9 and RH4 are PAE enabled (i changed RAM settings easly cause I use VMWare).

So it seems a problem related to SUSE.





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签