The basic structure of a Java virtual machine

Source: Internet
Author: User
  • The Java heap is used to hold object examples, related to data, and the Java stack is primarily related to thread function calls
  • function calls once in and out of the Java stack, call the time of the stack, call end (return or throw) out of the stack, function parameters and function Local variables are stored in the stack frame, so the function call after the stack frame is ejected, the corresponding local variables will be invalidated.
  • The more function arguments and local variables, the larger the table of local variables that need to be saved in the stack frame, and the fewer levels of function calls.
  • Local variables are important root nodes of garbage collection, and any objects that are referenced directly or indirectly by local variables are not recycled.
  • For non-escaping objects, the virtual machine can perform memory allocation optimizations to allocate these objects on the stack.
  • Allocations on the stack depend on the implementation of escape analysis and variable substitution.
  • The method area is shared by all threads, used to save classes, classes of methods, classes of variables, etc., in JDK1.6 and JDK1.7, the method area is the permanent zone, in JDK1.8, the permanent zone has been completely removed and replaced by the metadata area.

The basic structure of a Java virtual machine

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.