What’s the maximum amount of heap space that one can allocate for java on a 64-bit platform? Is it unlimited?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Theoretically 264, but there might be limitations (obviously)
According to this FAQ it’s only limited by memory and swap space on the local system:
See also Why can’t I get a larger heap with the 32-bit JVM?
Also keep in mind you need to set the max heap via command line. Without an -Xmx command. without it Java uses 64mb + 30% = 83.2mb as a default max heap on 64 bit machines according the same FAQ.
works fine on my machine. But it dosn’t seem to yet support the ‘t’ modifier so you can’t specify max memory in terabytes yet 🙂