myeclipse configuration memory

1. Modify eclipse.ini

There is a myeclipse.ini configuration file in G:\MyEclipse8.5\Genuitec\MyEclipse 8.5 under the Myeclipse installation directory. The settings are as follows:

-vmargs
-Xmx512m
-XX:MaxPermSize=256m
-XX:ReservedCodeCacheSize=64m

2 , Set Default VM Arguments

In myEclipse, open Windows->Preferences->Java->Installed JREs->Click the JDK->Edit->Default VM Arguments text box in use and enter: -Xms64m -Xmx256m

3. If it is web The project also reported memory overflow, it may be necessary to set the tomcat memory.

(1) %tomcat%bin/catalina.bat file in the installation root directory of tomcat, SET JAVA_OPTS line;
set JAVA_OPTS=-Xms1024m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=256m
The value in it can be based on the specific situation of the project Make adjustments to the specific situation of the machine

(2) myeclipse configuration web server configuration Window—Preferences—Myeclipse—Servers—tomcat 5.x—JDK’s Optional Java VM arguments are configured as:

-Xms256m -Xmx512m -XX:MaxNewSize=256m -XX:MaxPermSize=256m


Quote: http://lhp--2006.iteye.com/blog/1139064

4. If it is running in debug mode, you need to adjust the debug virtual machine parameters, Because the default memory allocation in debug mode is very small.

5. If eclipse runs the junit test and encounters a memory problem
. When running all the test cases, it is found that the operation cannot be completed. When some test cases are reached, an OutOfMemoryError occurs, which is caused by junit, because teardown does not clean up the used ones. For memory, you can only modify the parameters of Run to increase the memory.
The value set when Eclipse starts JUnit is about 64M, and the result of monitoring memory usage after I increase the memory shows that all test cases need to use 100M memory.
The method is: Run->Run...->JUnit->AllTests->(x)=Arguments->VM Arguments: -Xmx500m
Note that AllTests above is the class of the Test suite that contains all the test cases that you want to modify.

-Xmn is the young generation, generally not more than half of the heap size (-Xms and -Xmx).

Original address: http://lhp--2006.iteye.com/blog/1139064

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326687516&siteId=291194637