In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the relevant knowledge of "what is the method of JVM memory management". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
The JVM runtime data area is composed of program counter, heap, virtual machine stack (stack), local method stack and method area.
1) Program counter
There is almost no memory. Used to fetch the next instruction to be executed.
2) heap
The memory of all objects created through new is allocated in the heap, and its size can be controlled by-Xmx and-Xms. The heap is divided into the Cenozoic era and the old age, and the Cenozoic era is further divided into Eden and Survivor regions. Finally, the Survivor is composed of FromSpace and ToSpace. The structure diagram is as follows:
The new generation. New objects are allocated memory with the new generation. When the Eden space is insufficient, the surviving objects will be transferred to the Survivor. The size of the new generation can be controlled by-Xmn, or the ratio of Eden to Survivor can be controlled by-XX:SurvivorRatio, the old generation. Used to store objects in the new generation that are still alive after multiple garbage collection
3) Stack
When each thread executes each method, it applies for a stack frame in the stack, and each stack frame includes a local variable area and an Operand stack, which are used to store temporary variables, parameters and intermediate results during the method call.
4) Local method stack
Used to support the execution of native methods, storing the state of each native method call
5) method area
Stores the class information to be loaded, static variables, constants of type final, properties, and method information. JVM uses permanent generation (PermanetGeneration) to store the method area. (in the HotSpot virtual machine of JDK, the method area can be regarded as permanent generation, but in other types of virtual machines, there is no concept of permanent generation. For more information, please see Zhou Zhiming's book.) you can specify the minimum and maximum values through-XX:PermSize and-XX:MaxPermSize.
This is the end of the content of "what is the method of JVM memory Management". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.