Increase heap size in Java

后端 未结 12 2292
情深已故
情深已故 2020-11-21 05:26

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 siz

12条回答
  •  灰色年华
    2020-11-21 06:09

    On a 32-bit JVM, the largest heap size you can theoretically set is 4gb. To use a larger heap size, you need to use a 64-bit JVM. Try the following:

    java -Xmx6144M -d64

    The -d64 flag is important as this tells the JVM to run in 64-bit mode.

提交回复
热议问题