Java garbage collection mechanism

Source: Internet
Author: User

Go to: http://blog.csdn.net/lom9357bye/article/details/48895987

1. Data Division

(1) Virtual machine stack: used to store some local variables, method exports, etc., life cycle with the end of the program end

(2) Heap: For instances and arrays of reference types are allocated on the heap, the Java garbage collection mechanism is to reclaim the amount of memory in the heap

(3) Method area: Used to store the class information that has been loaded by the virtual machine, constants, static variables, and so on, the goal of this area of memory recovery is mainly to the collection of constant pool and type of unloading, the recovery of less memory, all also called this area for the permanent generation (permanentgeneration).

(4) Run a constant pool: a running constant pool is a part of the method area that holds the various literal and symbolic references generated during compilation

(5) Program counter: The program counter is a small memory space, it is the current thread execution byte code line number indicator, bytecode interpretation work is to change the value of this counter to select the next command to execute, it is thread-private memory, is the only area without Oom exception.

(6) Local method stack: Using the native method service for virtual machines

Java garbage collection mechanism

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.