Skip to main content

OutOfMemoryError

Learn OutOfMemoryError (JVM Problems, Java) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

6. Basic Concepts What is OutOfMemoryError? java.lang.OutOfMemoryError is thrown by the JVM when it cannot allocate an object because it has run out of memory in a particular area, and the Garbage Collector (GC) cannot free up enough space to continue. It is an Error , not an Exception - it signals a serious problem that a normal application usually cannot recover from on its own. There isn't just one kind of OutOfMemoryError - the JVM has several memory regions, and each can run out independently. The most common ones you will meet as a Java developer are: Java heap space - too many live...

More lessons in JVM Problems