specification for 64 bit?
Hi,
I am curious about whether or not it is possible to write Java programs that take advantage of a 64 bit machine; namely, would it be possible to allocate more than 4GB of heap memory? If this is possible, then what happens when you try to allocate more than 4GB of heap memory in a 32 bit environment?
I would also appreciate it if someone can direct me to a source that would lead me to this information.
Thanks in advance!
# 1
> I am curious about whether or not it is possible to
> write Java programs that take advantage of a 64 bit
> machine; namely, would it be possible to allocate
> more than 4GB of heap memory?
Yes. You need a 64-bit CPU and a 64-bit JVM. See http://java.sun.com/ for what CPU/operating system combinations they support; IBM etc may have others.
> If this is possible,
> then what happens when you try to allocate more than
> 4GB of heap memory in a 32 bit environment?
More than 4 GB on a 32-bit JVM = OutOfMemoryException. The actual limit may be lower due to operating system constraints; see your JVM's documentation.