This time, Eclipse is always dead, almost a little bit faster will die, a few minutes, make people depressed extremely. Wasted a lot of time, on-line search, see a lot of friends have similar situation, in the Internet for help, but the online approach is only to say by modifying the Eclipse.ini file to enlarge the memory of Eclipse.
I tried it, and found it useless. Today, died again, but a frequent error occurred, the effect is: PermGen space caused memory overflow. Really unbearable, internet a search, found that the network is really a good thing, especially for us as a scholar, is undoubtedly a mentor to teach doubts.
Here to summarize their experience and the experience of netizens, I hope to be affected by this problem of friends have some reference value.
The solution is as follows:
Add the following two lines to the Eclipse.ini configuration file
-xx:permsize=128m
-xx:maxpermsize=128m
Plus the last 2 lines, my Eclipse.ini file looks like this:
-showsplash
Org.eclipse.platform
--launcher. Xxmaxpermsize
512m
-vmargs
-xms256m
-xmx512m
-xx:permsize=128m
-xx:maxpermsize=128m
The size of the memory here depends on your physical memory situation.
From the information on the Internet to see permsize bigger is certainly better, and preferably set permsize and MaxPermSize as big. The reasons are as follows:
PermSize and MaxPermSize if set to the same can also improve performance to some extent, because permsize will need to transfer the data in the constant changes. If it is fixed, you can reduce the performance penalty for each expansion of the permsize.
1, PermGen space Introduction
PermGen space is the full name of permanent Generation space, refers to the memory of the permanent storage area Outofmemoryerror:permgen space from the surface is the memory benefits, the solution must be to increase memory.
Tell me why memory benefits:
(1) This section is used to store class and meta information, which is placed in the PermGen space area when loaded, and is different from the heap area where the instance is stored.
(2) GC (garbage Collection) does not clean up permgen space during the main program run time, so if your app will load many classes, PermGen space error is likely to occur. This error is common when the Web server pre-compile the JSP.
If you have a large number of third-party jars under your web app that are larger than the JVM's default size (4M), this error message will be generated.
Workaround: Manually set the MaxPermSize size
To modify the tomcat_home/bin/catalina.sh, add the following line above the echo "Using catalina_base: $CATALINA _base":
Java_opts= "-server-xx:permsize=64m-xx:maxpermsize=128m
Recommendation: Move the same third-party jar files to the Tomcat/shared/lib directory, which will reduce the memory consumption of the jar document repeatedly.
Transferred from: http://blog.csdn.net/shen_xiao_wei/archive/2010/07/16/5739848.aspx
Eclipse--java.lang.outofmemoryerror:permgen Space