A simple “Hello World” needs 10G virtual memory on a 64-bit machine vs 1G at 32-bit?

前端 未结 7 1506
有刺的猬
有刺的猬 2021-02-02 05:33

Running a simple Java program on our production machine, I noticed that this program eats up more 10G virt. I know that virtual memory is not that relevant, but at least I would

7条回答
  •  误落风尘
    2021-02-02 06:00

    The default sizes for initial heap and maximum heap are defined as a percentage of the machine's physical memory, of which a production server nowadays tends to have a whole lot.

    You can choose both via the -Xms and -Xmx command line options.

提交回复
热议问题