Computer Scientist

Saturday, 19 February 2011

What if you encounter an error message of "out of heap" in Java?

At this time, you need to:
 (1). check the program and find out any possibility to free the unnecessary resource.
 (2). increase your heap size to achieve more memory allocated to java.

Here I only care about the later one:

java -Xms<initial heap size> -Xmx<maximum heap size>
Defaults are:
java -Xms32m -Xmx128m


                                    

No comments:

Post a Comment