Avoiding Initial Memory Heap Size Error

前端 未结 3 866
清酒与你
清酒与你 2020-12-03 10:38

I run a Java code with the following command:

$ java -Xms4G -Xmx4G myjavacode

My cpu\'s RAM capacity is 6GB.

However it always fail

3条回答
  •  借酒劲吻你
    2020-12-03 11:03

    You've exceeded the maximum heap size of your JVM. This is both JVM and OS dependent. In most 32-bit systems the maximum value will be 2Gb, regardless of the physical memory available.

提交回复
热议问题