Java Virtual Machine---memory

Source: Internet
Author: User

  Java Virtual Machine---memory

  Javavirtual machines, i.e.JVM, responsible for runningJavaprograms, eachJavaprograms are run in a specificJVMinstance. Javathe architecture of virtual machines is divided into: class loading subsystem, runtime data area, execution engine. The class loading subsystem is responsible for loading, validating, parsing, initializing the Java class System; the Java Virtual machine needs to store a lot of data when running a program, such as class loading information, created instance object, parameter of method call, local variable, intermediate value, etc., the virtual machine stores this information in the "Runtime data area". That is, the JVM memory that is spoken here; the execution engine is the input of the class file in bytecode form, and the running program outputs the calculation result.

  

Java Virtual machine memory is a conceptual thing, the official does not give a specific implementation, knowledge gives a standard or specification, each Java Virtual machine manufacturers can design their own virtual machine according to this specification, the user can also set the size of each part of the memory through the instruction set.

JVM memory consists of several areas: The method area, the heap, the Java stack, the PC storage area, and the local method stack.

Method Area: Store class information, constants, static variables, compiled bytecode, all threads shared

Heap: Store Instance object information, shared by all threads

Java stack: The state of a method call, stored as a stack frame in the form of parameter passing, local variables, calculation of intermediate values and other information, return address, each thread a

PC Register: Point to the next instruction to be executed, one for each thread

Local method Stack: similar to the Java stack, except that the Java stack provides a service to the virtual machine to execute the Java method, while the local method stack provides a service for the virtual machine to perform the local method

Java Virtual Machine---memory

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.