Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


samar
Java OutOfMemoryError
1 Answer(s)      4 years and 2 months ago
Posted in : Java Interview Questions


What will you do if VM exits while printing "OutOfMemoryError" and increasing max heap size doesn't help?

Advertisement
View Answers

October 28, 2010 at 5:34 PM


Hello,

The Java HotSpot VM cannot expand its heap size if memory is completely allocated and no swap space is available. This can occur, for example, when several applications are running simultaneously. When this happens, the VM will exit after printing a message similar to the following.

Exception java.lang.OutOfMemoryError: requested bytesIf you see this symptom, consider increasing the available swap space by allocating more of your disk for virtual memory and/or by limiting the number of applications you run simultaneously. You may also be able to avoid this problem by setting the command-line flags -Xmx and -Xms to the same value to prevent the VM from trying to expand the heap. Note that simply increasing the value of -Xmx will not help when no swap space is available.

Thanks.



Related Tutorials/Questions & Answers:
Java OutOfMemoryError
Java OutOfMemoryError   What will you do if VM exits while printing "OutOfMemoryError" and increasing max heap size doesn't help
Java - Java Beginners
OutOfMemoryError error is your Java program, you should consider increasing the JVM space...Java  1.How do you declare the starting point of a Java application? 2. What happened if your program terminates with an OutOfMemoryError
Advertisements
OutOfMemory Error - Java Interview Questions
OutOfMemory Error  Question 1> Your application is crashing due to OutOfMemoryError ? whats the solution for this.Don't tell me restart the Server and ask the user to login to the application again and again?Provide me
java
java  diff bt core java and java
java
java  what is java
Java
Java   Whether Java is pure object oriented Language
java
java  different between java & core java
JAVA
JAVA  how the name came for java language as "JAVA
java
java  explain technologies are used in java now days and structure java
java
java   why iterator in java if we for loop
java
java  what is java reflection
java
java  is java open source
java
what is the size of array in java ?  what is the size of array in java ? what is the mean of finalize in java
java
java   in java does not pointers concept but what is nullpointers in java?   nullpointer is a runtime Exception
Java
Java  how to draw class diagrams in java
java
java  explain object oriented concept in java
java
java  is java purely object oriented language
Java
Java   Whether Java is Programming Language or it is SOftware
java
java  what are JAVA applications development tools
java
java  how use java method
java
java  write a program in java to acess the email
java
java  why to set classpath in java
java
java  why to set classpath in java
java
java  why to set classpath in java
java
java  give a simple example for inheritance in java
java
java  give a simple example for inheritance in java
Java
Java  how to do java in command prompt
java
java  Does java allows multiline comments
java
java  sample code for RARP using java
java
java   What is ?static? keyword
java
java  write a java program using filenotfoundexception
Advertisements
 

 

 

DMCA.com