1. Modify Eclipse.ini
G:\MyEclipse8.5\Genuitec\MyEclipse 8.5 has a Myeclipse.ini profile under the MyEclipse installation directory, set as follows:
-vmargs
-xmx512m
-xx:maxpermsize=256m
-xx:reservedcodecachesize=64m
2. Set Default VM Arguments
In MyEclipse, open windows-> preferences->java->installed jres-> Click on the Jdk->edit->default VM you are using Arguments text box enter:-xms64m-xmx256m
3, if the Web project also reported memory overflow, you may want to set Tomcat memory.
(1) Tomcat's installation root directory%tomcat%bin/catalina.bat file, SET java_opts line;
Set java_opts=-xms1024m-xmx1024m-xx:permsize=128m-xx:maxpermsize=256m
The value inside can be adjusted according to the specific situation of the project and the specific condition of the machine
(2) MyEclipse configuration Web server configuration window-preferences-myeclipse-servers-tomcat 5.x-jdk optional Java VM arguments configured as:
-xms256m-xmx512m-xx:maxnewsize=256m-xx:maxpermsize=256m
4. If you are running in debug mode, you need to adjust the virtual machine parameters for debug because there are very few default memory allocations for debug mode.
5 If it is Eclipse run JUnit test encounters a memory problem
When you run all of your test cases, you find that you can't run out of it, and outofmemoryerror when you go to some of the later test cases, which is the result of JUnit, because teardown doesn't clean up the used memory, it can only change the parameters at run time and increase the memory.
When Eclipse started JUnit, the value set was about 64M, and the result of my memory-monitoring memory usage after I stepped in was that all test cases needed 100M of memory.
Method is:run->run...->junit->alltests-> (x) =ARGUMENTS->VM Arguments:-xmx500m
Note the alltests above for the class that contains the test suite for all of the testing cases that you want to modify.
-xmn is a young generation, generally not more than half of the heap size (-XMS and-XMX)
The above content for you to introduce the cause of myeclipse memory problems and solutions to the relevant knowledge, I hope you like.