In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article introduces the example analysis of JVM runtime memory in java development, the content is very detailed, interested friends can refer to, hope to be helpful to you.
The runtime memory of 1.JVM is also called JVM heap.
From the point of view of GC, JVM can be divided into the new generation, the old age and the eternal generation. Among them, the new generation defaults to account for 1max 3 heap memory space, while the old generation defaults to 2max 3 memory space, and permanent generation takes up very little heap memory space.
The Cenozoic era is divided into Eden,SurvivorFrom,SurvivorTo region, Eden accounts for 8x10 Cenozoic area space by default, while SurviorFrom and SurviorTo account for 1max 10.
2.JVM newly created object
JVM newly created objects, except for large objects, will be placed in the new generation. Because JVM will create objects frequently, the new generation will frequently start MinorGC for garbage collection.
3. Detailed explanation of Cenozoic era
The newly created objects in 1.Java are first placed in the Eden area, and if the objects are large, they are assigned to the elderly area.
When there is insufficient memory space in the 2.Eden area, GC will trigger a garbage collection for the new generation.
3.SurviorTo saved the survivors of the last MinorGC.
4.SuviorFrom takes the last MinorGC as the scanning object this time.
4. A detailed explanation of the old age
In the old era, MajorGC will not start frequently, and when there is still a shortage of space in the old era after MinorGC, it will trigger MajorGC for garbage collection. MajorGC uses a tag removal algorithm. It takes a long time to scan all the objects in the old days.
5. Permanent generation
Refers to the permanent storage area of memory, mainly storing Class and Meta (metadata).
This is the end of the sample analysis of JVM runtime memory in java development. I hope the above can be helpful to you and learn more. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.