0 votes
1 view
in Java by (3.2k points)

I am working on a Windows 2003 server (64-bit) with 8 GB RAM. How can I increase the heap memory maximum? I am using the -Xmx1500m flag to increase the heap size to 1500 Mb. Can I increase the heap memory to 75% of physical memory (6 GB Heap)?

1 Answer

0 votes
by (35.8k points)

You can grow to 4GB on a 32 bit system. If you're moving a 64 bit system you can go great. No need to suffer if you've chosen incorrectly if you require for 5g on a 32-bit system java will fret about an invalid value and quit.

cmd-line flags - e.g.

java -Xmx6g myprogram

You can get a complete list (or a nearly full list, anyway) by typing java -X.