Java run-time data region

Source: Internet
Author: User

When I looked at the JVM principle yesterday, I briefly summed up the data region of the Java Runtime:

1. Program counter
A program counter is a small amount of memory space that can be viewed as a signal indicator of the byte code executed by the current thread. In the virtual conceptual model, the bytecode interpreter works by changing this counter
Value to select the next command to execute, the base functions such as branching, looping, instruction, exception handling, thread recovery, and so on, need to rely on this counter.
2. Java Virtual machine stack
A reference to a class is stored in the stack
3. Local Method Stack
4. Java Heap
The largest chunk of memory managed in a Java virtual machine, the Java heap is an area that is shared by all the thread locks and created when the virtual machine is started. The only purpose of this memory area is to hold an object instance if the heap does not have
The memory completes the instance assignment, and the heap cannot be extended, and an Oom exception is thrown.
5. Method area
A thread-shared memory area used to hold class information, static variables, constants. An abnormal oom is thrown when the method area cannot satisfy the memory allocation.

Java run-time data region

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.