[ACCEPTED]-Max memory for 64bit Java-heap
Theoretically 264, but there might be limitations 11 (obviously)
According to this FAQ it's only limited 10 by memory and swap space on the local system:
On 64-bit VMs, you have 64 bits of addressability to work with resulting in a maximum Java heap size limited only by the amount of physical memory and swap space your system provides.See 9 also Why can't I get a larger heap with 8 the 32-bit JVM?
Also keep in mind you need 7 to set the max heap via command line. Without 6 an -Xmx command. without it Java uses 64mb 5 + 30% = 83.2mb as a default max heap on 4 64 bit machines according the same FAQ.
java -Xmx1000g myClass
works 3 fine on my machine. But it dosn't seem 2 to yet support the 't' modifier so you can't 1 specify max memory in terabytes yet :)
If you could make every atom in the universe 10 into a byte of RAM, you could allocate it 9 in a 64 bit address space.
Actually, that's 8 a slight exaggeration.
There are 10^80 atoms 7 in the universe (according to WolframAlpha), and 6 2^64 bytes of address space in a 64 bit 5 system, so you'd only be able to address 4 1 out of every 5x10^60 atoms. But if you 3 have 18 qintillion bytes of RAM, you'd probably 2 need a couple of quantum black holes to 1 power it with.
This probably depends on the system your 10 VM is running in. If you are running a AMD 9 x64 architecture the address space of currently 8 shipped processors uses 48 Bits, not 64. This 7 results in a theoretical maximum of roughly 6 256 TB. (See http://en.wikipedia.org/wiki/X86-64)
I am not a specialist in VMs, but 5 any modern OS typically will give as much 4 memory as there is physical RAM plus available 3 virtual memory. Probably thats what the VM will 2 pass to your application depending on its 1 configuration.
With recent VMs from Sun, the practical 7 heap limit size is usually 512 times the 6 available physical and/or virtual memory. Even 5 if the theoretical limit is much higher, the 4 VM will allocate 1 byte for maangement purposes 3 for each 512 bytes of heap memory on startup, so 2 1TB of heap will immediately require 2GB 1 for the memory management.
In theory its between 2^63
and 2^64
bytes.
In practice 7 it is limited by the amount of physical 6 memory and swap space available on your 5 machine. And the physical memory is in 4 turn limited by your chipset (i.e. the number 3 of address pins on the physical memory address 2 bus) and motherboard (i.e. the number and 1 size of the DIMM sockets).
More Related questions
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.