samar
Java OutOfMemoryError
1 Answer(s)      2 years and 7 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?
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 Pages:
Java OutOfMemoryError
Java OutOfMemoryError   What will you do if VM exits while printing "OutOfMemoryError" and increasing max heap size doesn't help
OutOfMemoryError
Java NotesOutOfMemoryError If your Java program is running out of memory, there are several things you can do. Make unused objects garbage collectable... in the heap. Make unused objects garbage collectable Java's automatic garbage
OutOfMemoryError Warning System - Java Tutorials
OutOfMemoryError Warning System 2004-07-20 The Java Specialists' Newsletter [Issue 092] - OutOfMemoryError Warning System Author: Dr. Heinz M. KabutzJDK... of The Java(tm) Specialists' Newsletter. Down here at the end of Africa, tech-toys
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
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 - JDK Tutorials
Java - JDK Tutorials   Deadlocks in Java In this tutorial you will learn about Deadlocks in Java. Author explains about Java Deadlocks.   Java GC Detailed discussion of Young and Old Generation GC
References,java newsletter,java,tutorial
References 2004-11-08 The Java Specialists' Newsletter [Issue 098... or RSS. Welcome to the 98th edition of The Java(tm..., you would agree with me ;-] I usually run my Java
Lack of Streaming leads to Screaming - Java Tutorials
Lack of Streaming leads to Screaming 2002-05-24 The Java Specialists... email or RSS. Welcome to the 47th edition of The Java(tm) Specialists' Newsletter, read by over 3600 Java programmers in 82 countries. I have put my
Java Notes: Table of Contents
Java Notes: Table of Contents Java Notes. These Java programming notes.... Java Basics. I've started writing a more coherent tutorial called Java... are done the way they are. Copyleft Java Notes
java
java  diff bt core java and java
java
java  what is java
JAVA
JAVA  how the name came for java language as "JAVA
java
java   why iterator in java if we for loop
java
java  explain technologies are used in java now days and structure java
java
java  different between java & core java
java
java  what is java reflection
java
java  is java open source
java
java   in java does not pointers concept but what is nullpointers in java?   nullpointer is a runtime Exception
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   What is ?static? keyword
java
java  RARP implementation using java socket
java
java  sample code for RARP using java
java
java  Does java allows multiline comments
Java
Java  how to do java in command prompt
java
java  give a simple example for inheritance in java
java
java  give a simple example for inheritance in java
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  why to set classpath in java
java
java  Write a java code to print "ABABBABCABABBA
java
java  write a program in java to acess the email
java
java  send me java interview questions
java
java  how use java method
java
java  what are JAVA applications development tools
Java
Java   Whether Java is Programming Language or it is SOftware
java
java  is java purely object oriented language
java
java  why multiple inheritance is not possible in java
java
java  explain object oriented concept in java
java
java   difference between class and interface
java
java  hi im new to java plz suggest me how to master java....saifjunaid@gmail.com
java
java   How to set java Policy for applet using jdk 6
java
java  dear, i want a field for date picker using java/java script
java
java  create java program for delete and update the details,without using database, just a normal java program
java
java  why methods in java raise exceptions   Have a look at the following link: Java Exceptions
java
java code to search the nodes  how to write the java code to search the nodes using routers
java
java online telephone directory  i need coding for online telephone directory..by using java....pls help me
java
java  how to edit text document by using java then how to edit starting and ending of text document by using java
java
java  different between java & core java print("code sample
java
java  different between java & core java print("code sample

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.