转自:
[url]http://stackoverflow.com/questions/1190837/java-xmx-max-memory-on-system[/url]
The limit for -XmX [color=red][b]is -Xmx1500m on 32 bit windows[/b][/color]. Shared libraries get in the way of a bigger heap. You'll need about 2Gb of RAM to do this.
On non-windows OSes you can go bigger, and 64Bit JVM's are capable of a LOT more.
Windows XP will not let you have more than 3Gb of RAM ( doesn't care if you have 4Gb physical, ever since XP SP3) Vista may be different YMMV.
I've tried -Xmx4000M on a 64 bit JVM on 64 bit Linux and it was fine. considering I had 6Gb of physical ram, it was not a big request.
[url]http://stackoverflow.com/questions/1190837/java-xmx-max-memory-on-system[/url]
The limit for -XmX [color=red][b]is -Xmx1500m on 32 bit windows[/b][/color]. Shared libraries get in the way of a bigger heap. You'll need about 2Gb of RAM to do this.
On non-windows OSes you can go bigger, and 64Bit JVM's are capable of a LOT more.
Windows XP will not let you have more than 3Gb of RAM ( doesn't care if you have 4Gb physical, ever since XP SP3) Vista may be different YMMV.
I've tried -Xmx4000M on a 64 bit JVM on 64 bit Linux and it was fine. considering I had 6Gb of physical ram, it was not a big request.