Difference between PermGen(Permanent Generation) and Metaspace in Java
source link: http://adnjavainterview.blogspot.com/2023/09/difference-between-permgen-and-metaspace-in-java.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Saturday 30 September 2023
Difference between PermGen(Permanent Generation) and Metaspace in Java
In this post, we will discuss the difference between PermGen i.e Permanent Generation and Metaspace in java 8(feature).
Before java 8, static methods and variables are stored in PermGen space but in java 8 they have introduced new memory space called Metaspace. The default allocation size of PermGen is 64MB, if it exceeds it should throw an OutOfMemoryError. As if we need to fix this issue need to increase the PermGen space using JVM parameter –XX:MaxPermSize.
Metaspace memory space introduced in java 8 to resolve the above issue. Internally it will automatically increases the size when allocation memory size increases. No need to increase the memory size manually.
Thank you for visiting the blog.
No comments:
Post a Comment
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK