Ext: MyEclipse Install the Eclipse Memory Analyzer plugin and perform the error file analysis process

Source: Internet
Author: User

Turn from HTTP://WWW.CNBLOGS.COM/NB44C/P/5218880.HTML1. Install the mat plugin first
    1. Memory Analyzer Plugin: http://www.eclipse.org/mat/downloads.php

    2. Click to download

3. Extract the downloaded files to the MyEclipse Dropins folder

4. Create a. link file with the same name as the folder, and write the corresponding address in the file (address using \ \ or/)

5. Restart MyEclipse to see the Memory Analyzer option in window---->preferances.

2. Analyze instances using the Mat tool

1. Create test Java code

-verbose:gc-xms20m-xmx20m
-xx:+heapdumponoutofmemoryerror

* @author y * */public class Test {    static class oomobject{            } public        static void Main (string[] args) {        Lis t<oomobject> list = new arraylist<oomobject> ();                while (true) {            list.add (new Oomobject ());}}}   

2. Set the operating parameters

Parameter explanation:

1, the heap is a storage object instance, that is, the class is written in the heap memory allocation; Set the size of the heap:-xmx20m ( maximum),-xms20m(minimum).
2, the stack is to store local variables, operations stack, dynamic link, method exit (all in the stack frame), when the method is called, the stack frame is created; Sets the size of the stack:-xss128k.
3, the method area is the information that holds class, such as Class name, access modifier, constant pool, field description, method description, and so on. In addition, the run-time constant pool belongs to the method area, that is, storing constants, static constants, etc., set the method area size,-xx:permsize=10m, and-xx:maxpermsize=10m.
4, local direct memory ; set local direct memory size:-xx:maxdirectmemorysize(the default is the same as the value of-XMX).

3. Run the program, the following information will appear

Analysis: Refer to the blog

http://www.ibm.com/developerworks/cn/opensource/os-cn-ecl-ma/index.html?ca=drs-

http://essen.iteye.com/blog/1825314

http://tivan.iteye.com/blog/1487855

Ext: MyEclipse Install the Eclipse Memory Analyzer plugin and perform the error file analysis process

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.