This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have a program which needs to extract data from a database and then organize the data into a tree-like structure. The problem I am having is that the data is huge and takes more than the 1.5 gb heap limit, so I am getting the outofmemory exception. It seems that there is no way to get java to use more than 1.5gb. Could anyone give me any recommendations as to how to solve this problem?
It seems that there is no way to get java to use more than 1.5gb. Could anyone give me any recommendations as to how to solve this problem?
I am assuming that you know about Java's -Xmx switch?
The JVM is merely a process running in the underlying OS. It must live within the restrictions set by the OS. For a 32 bit OS, the process size is generally 4GB, this is further limited to what is available to the process, and further needed by the JVM process. (and 1.5 GB is about average)
Anyway, to get more heap, you will need to get a 64bit JVM, that runs on a 64bit OS, running on a 64bit processor machine.
Thanks for the quick reply, Yes I do know about Xmx. So is the only solution for me to get a new computer(64-bit)?? Also would reimplementing my problem with a different language be able to solve this problem?