aspose file tools*
The moose likes Java in General and the fly likes outofmemory increasing heap past the cap. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "outofmemory increasing heap past the cap." Watch "outofmemory increasing heap past the cap." New topic
Author

outofmemory increasing heap past the cap.

Emnaki Chih
Ranch Hand

Joined: Sep 01, 2004
Posts: 30
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?
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18123
    
  39

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.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Emnaki Chih
Ranch Hand

Joined: Sep 01, 2004
Posts: 30
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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: outofmemory increasing heap past the cap.
 
Similar Threads
OutOfMemory Error
OutOfMemory
OutOfMemory
outOfMemory
Memory Leaks and OutOfMemory