一台linux服务器,原来是2g内存,现在增加到了8g,但是不知道怎么回事情,用
java -Xmx1024M -version 可以正常运行,
但是用
java -Xmx4444M -version 却不行,不知道什么原因,郁闷,难道机器加了内存,java认不了,还是默认的2g.
[sss@szgeodevapp3 ~]$ java -Xmx1024M -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Server VM (build 20.1-b02, mixed mode)
[sss@szgeodevapp3 ~]$ java -Xmx4024M -version
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
[sss@szgeodevapp3 ~]$ free -m
total used free shared buffers cached
Mem: 7983 312 7670 0 14 150
-/+ buffers/cache: 148 7834
Swap: 2047 0 2047
[sdeng@szgeodevapp3 ~]$
------解决方案--------------------------------------------------------
还是有限制地,可以参考下:http://dev2dev.bea.com.cn/bbs/thread.jspa?forumID=121&threadID= 35704&start=0&tstart=0