I'm trying to set up a tomcat server to make use of my machine's 6 gig worth of memmory (it needs it). However when i try to set the -Xmx option to set a maximum heap size over 1800m then i get an error saying "could not reserve enough space for object heap" . This behavior is the same with sun's j2sdk1.4.1_02, blackdowns j2sdk1.4.1-01 and bea's jrockit 8. Does anyone know if heap size can get beyond 1.8 gig on linux, and if so how to do it?
Joined: May 19, 2003
To answer my own question looks like just below 2 gig is all the memmory the jvm can use on linux. see http://developer.java.sun.com/developer/bugParade/bugs/4435069.html Fo the lazy this says: "using Java on linux the maximum amount of memory you can use is -mx1960m, ie you cannot use a 2GB Java heap. Ie Java -mx2000m -version will display an error message about lack of heap space Part of the problem is that linux has previously had restrictions with pthreads using a 2GB heap even though the stack space per process is 'unlimited'" my research seems to indicate that the limit is 4gig on sparcs so even suns own hardware has a fairly low limit.
subject: java on linux, setting max heap size (-Xmx)