Max memory for 64bit Java

后端 未结 5 1807
庸人自扰
庸人自扰 2020-12-05 19:09

What\'s the maximum amount of heap space that one can allocate for java on a 64-bit platform? Is it unlimited?

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-05 19:30

    This probably depends on the system your VM is running in. If you are running a AMD x64 architecture the address space of currently shipped processors uses 48 Bits, not 64. This results in a theoretical maximum of roughly 256 TB. (See http://en.wikipedia.org/wiki/X86-64)

    I am not a specialist in VMs, but any modern OS typically will give as much memory as there is physical RAM plus available virtual memory. Probably thats what the VM will pass to your application depending on its configuration.

提交回复
热议问题