Why can I register an OutOfMemory error in java?

To register anything in a catch block, we need text that is a String object, but the JVM has already run out of memory. There are two possible reasons:

  • The OutOfMemory error means empty space and the String object can be stored in the string pool.
  • An OutOfMemory error means that less space is left, unlike a heap that is completely full, and you can use less space to store the line that needs to be registered.
+4
source share
1 answer

A very broad question, but one simple answer: when implementing the JVM, you probably won't want to wait until you have 100% of your memory.

: " ", 99,99% . , "" , (-) " ".

: "" , ... , JVM ; /. (imho), , !

+3

Source: https://habr.com/ru/post/1676914/


All Articles