Sun/oracle jdk in the hotspot VM until JDK7 has a "persistent generation" (Permanent Generation, abbreviated as PermGen). Also known as the method area.
The Oracle JDK8 hotspot vm is stripped of "persistent generation" and replaced with "metadata area" (metaspace).
Oracle announced the removal of the PermGen memory area when JDK7, but knew JDK8 was eventually removed.
Before JDK7, the so-called permanet generation memory area actually contains two parts:
- Method area
- internded String
The method area mainly stores some information about class, including running constant-time pool, classloader reference, field data, method data and so on.
The interned string memory area is removed from the JVM memory area at JDK 7.
Here is a note on removing the PermGen memory area, which is interesting to look at:
HTTP/mail.openjdk.java.net/pipermail/hotspot-dev/2012-september/006679.html
JDK8 introduces a new native memory block, Metaspace (the "metadata" area that the main title says). That is, you do not have to deal with the PermGen area after tuning or investigating the JVM problem, and there is no java.lang.OutOfMemoryError:PermGen to harass you with this memory shortage problem.
Tony Tang
Links: https://www.zhihu.com/question/27429881/answer/36600315
Source: Know
Copyright belongs to the author. Commercial reprint please contact the author for authorization, non-commercial reprint please specify the source.
What is the relationship between the "method area" and "metadata area" in the HotSpot Java virtual machine?