Memory Model for Java Runtime

Source: Internet
Author: User

Original Title:JVM Run-Time Data Areas

Refer:



Each thread has a separate data zone (not shared among threads). Each thread has a separate memory zone, which includes the program counter register ), JVM Stack and Native Method Stack ). When a new thread is created, the memory is allocated.
Program counter: in order to restore the thread to the correct execution position after switching, each thread requires an independent program counter. The counters between threads do not affect each other and are stored independently. JVM Stack: its structure is shown in:
Java code.
The heap and method zones shared by all threads are shared by all threads.
Heap zone: This is the most common area for storing arrays and objects. This part of memory exists at JVM startup. The garbage collector (GC) works in this region.
Method Area: used to store the run-time constant pool ).
Runtime constant pool: it is the expression of every class or interface constant, including several constants, including values that are known during the compilation period and those that are only known during parsing.
The stack consists of frames. When a method is called, the corresponding frames will be pushed to the stack. The frame contains local variables, the operand stack, and references pointing to the constant pool.
Http://www.programcreek.com/2013/04/jvm-run-time-data-areas/.

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.