1

Support to PermGen Pool has now been removed in Java 8. What is the alternative for PermGen Pool in Java 8. How & where java 8(JVM) is storing per-class structure & internal string.

Does it also mean that we will not get the "java.lang.OutOfMemoryError: Java heap space" error

Roman C
  • 48,723
  • 33
  • 63
  • 158
VirtualLogic
  • 644
  • 1
  • 10
  • 24

1 Answers1

1

It will use Metaspace which is PermGen successor. More info here.

To answer your question

A new flag is available (MaxMetaspaceSize), allowing you to limit the amount of native memory used for class metadata. If you don’t specify this flag, the Metaspace will dynamically re-size depending of the application demand at runtime.

So yes due to dynamic re-sizing the java.lang.OutOfMemoryError: Java heap space will not occur till native memory is exhausted but still you need to take care of class and classloader memory leaks.

Aniket Thakur
  • 63,511
  • 37
  • 265
  • 281