PermGen vs Metaspace
What is the difference between PermGen and Metaspace?
The difference between PermGen and Metaspace are:
- PermGen or Permanent Generation is a segment of Java Heap whereas Metaspace is a segment of Native Memory (Operating System process memory).
- Metaspace is part of Native Memory and therefore only depends on Operating System.
- User must configure maximum Metaspace size(-XX:MaxMetaspaceSize) in order to control consumption of excessive Native Memory.