File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Max heap of 2GB specified but but OutOfMemory-Exception with heap only having 1.1GB?

 
Tom Sanders
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

I have an application with should use at most 2GB of heap, as specified via -Xmx2048m, however it regularly throws an OutOfMemory-Exception (even after I increased the max heap amount to 3GB). After I examined the the heap, I noticed that it is only 1.1GB in size which leaves me abit puzzled as to why this is happening.
I mean, if it cannot allocate more than 1.1GB, then the app should even start with the -Xmx2048m param but instead throw an OoM-Exception immediatly.

Does anyone know what can cause this? As a sidenote, the jvm-vendor is IBM, version is 1.6 and operating system is AIX.
 
Henry Wong
author
Marshal
Pie
Posts: 20836
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tom Sanders wrote:Hi there,

I have an application with should use at most 2GB of heap, as specified via -Xmx2048m, however it regularly throws an OutOfMemory-Exception (even after I increased the max heap amount to 3GB). After I examined the the heap, I noticed that it is only 1.1GB in size which leaves me abit puzzled as to why this is happening.
I mean, if it cannot allocate more than 1.1GB, then the app should even start with the -Xmx2048m param but instead throw an OoM-Exception immediatly.

Does anyone know what can cause this? As a sidenote, the jvm-vendor is IBM, version is 1.6 and operating system is AIX.



A shot in the dark .... Try adding -Xms2048m to the command line to see if that gets the desired result.

Henry
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic