(4) Java method area

Source: Internet
Author: User

Java Method Area
"Noun analysis"
---> Like the Java heap, a method area is a region of memory shared by all threads.
---> Save the class information of the system, such as the fields of the class, methods, constant pools, etc.
the size of the---> method area determines how many classes the system can hold, and if the system defines too many classes, causing the method area to overflow, the virtual machine also throws a memory overflow error
--->jdk1.6 and jdk1.7 method areas can be understood as permanent areas.
--->jdk1.8 has canceled the method area, instead of the metadata area.
the metadata area of the--->jdk1.8 can be set by using the parameter-xx:maxmetaspaceszie, which is a direct memory outside of the heap, unlike the permanent zone, which, by default, consumes the available system memory, without specifying a size


"parameter setting"
--->jdk1.6 and jdk1.7 can be specified using the Parameters-xx:permsize and-xx:maxpermsize
--->-xx:permsize =5m default boot size is 5M
--->-xx:maxpermsize=64m maximum size is 64M
"Exception"
--->
--->jdk1.8 metadata area memory overflow: java.lang.OutOfMemoryError:Metaspace

(4) Java method area

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.