In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "what are the knowledge points of java JVM memory region". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what are the knowledge points of java JVM memory region".
JVM memory area
Program counter
1. Each thread has its own independent program counter
two。 If the thread executes a non-native method, the address of the instruction that currently needs to be executed is stored in the program counter; the native method is executed with the value undefined
3. The program counter size does not change with program execution, so OOM (OutOfMemory) does not occur.
Java virtual machine stack
1. Is private to the thread
two。 Store local variable table, Operand stack, dynamic link, method exit
3. The local variable table stores basic data types (not objects, but int,short,boolean, etc., in which long and double occupy two variable spaces) and object references
4. A StackOverflowError exception occurs when the stack depth requested by a thread is greater than the depth allowed by the virtual machine; if the virtual machine stack is dynamically expanded, enough memory cannot be requested, then OutOfMemoryError.
Local method stack
1. The local method stack serves the Native method used by the virtual machine
two。 StackOverflowError and OutOfMemoryError are also thrown.
Java reactor
1. Generated when the Java virtual machine starts and is shared by all threads
two。 It can be subdivided, for example, from the point of view of memory recovery, it can be subdivided into Cenozoic, old age, Eden space, From Survivor space, To Survivor space; from the perspective of memory allocation, it can be subdivided into private allocation buffers of multiple threads.
3.Java heaps can be physically discontinuous and logically continuous.
4. If there is no memory in the heap to complete the instance allocation, and the total size of the heap cannot be expanded, an OutOfMemoryError is thrown.
Method area
1. Is the area of memory shared by each thread
two。 Used to store data such as class information, constants, static variables, compiled code, etc. that have been loaded by the virtual machine.
3. When the method area fails to meet the memory allocation requirements, an OutOfMemoryError is thrown.
Running constant pool
1. The run-time pool is part of the method area
two。 The constant information in the Class file and the translated direct references are also stored here.
3. OutOfMemoryError is thrown when the constant pool can no longer apply for memory.
Direct memory
1. It is not part of the runtime data area of the Java virtual machine, but the Java program directly requests the machine's memory through the Native function.
two。 OutOfMemoryError is thrown when there is not enough memory.
Thank you for your reading, the above is the content of "what are the knowledge points of java JVM memory region". After the study of this article, I believe you have a deeper understanding of what the knowledge points of java JVM memory region have, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.