Java Virtual machine Learning-object creation

Source: Internet
Author: User

Virtual opportunity to a new directive, first checks whether the parameter of the directive can be positioned in a constant pool for a symbolic reference of a class, and checks whether the class represented by the symbol reference has been loaded, parsed, and initialized. If not, the loading procedure for the corresponding class must be performed first.

After the class load check passes, the virtual machine then allocates memory for the new object. The size of the memory required by an object is fully determined after the class is loaded, and the task of allocating space to an object is equivalent to dividing a size of memory from the Java heap. Assuming that the memory in the Java heap is absolutely regular, all the used memory is put aside, the free memory is put on one side, and the pointer is placed in the middle as the indicator of the dividing point, the allocated memory simply moves that pointer to the free space beyond the distance that is equal to the object size, which is called "pointer collision". If the memory of the Java heap is not regular, the virtual machine must maintain a list of which memory blocks are available, find a large enough space in the list to be allocated to the object instance, and update the records on the list, which is called the "Idle list."

Java Virtual machine Learning-object creation

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.