Java Method Area

Source: Internet
Author: User

refhttp://blog.csdn.net/huangfan322/article/details/53220169

https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-2.html2.5.4. Method Area

The Java virtual machine have a method area, which is a gkfx among all Java virtual machine threads. The method area was analogous to the storage area for compiled code of a conventional language or analogous to the "text" s Egment in an operating system process. It stores Per-class structures such as the Run-time constant pool, field and method data, and the code for methods and con Structors, including the special methods (§2.9) used in class and instance initialization and interface initialization.

The method area was created on virtual machine start-up. Although the method area was logically part of the heap, and simple implementations could choose not to either garbage collect or Compact it. This version of the Java Vsan specification does not mandate the location of the method area or the policies us Ed to manage compiled code. The method area is the a fixed size or may be expanded as required by the computation and may be contracted if a larger Method area becomes unnecessary. The memory for the method area does isn't need to being contiguous.

A Java Virtual machine implementation could provide the programmer or the user control over the initial size a REA, as well as, with the case of a Varying-size method area, control over the maximum and minimum method area size.

The following exceptional condition is associated and the method area:

    • If memory in the method area cannot is made available to satisfy a allocation request, the Java Virtual machine throws an OutOfMemoryError.

Java Method Area

Related Article

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.