4,552,347 th visitor since 2017.2.1 ( Today : 120 )
Programming
No. 459
Name. swindler
Subject. Eclipse PermGem Space 에러
Main Cate. Java
Sub Cate.
Date. 2008-07-19 15:35
Hit. 4662 (211.36.27.8)
File.
eclipse에서 heap size가 부족하여 permgem space 부족 에러가 나면
다음과 같이 옵션을 줘서 처리할수 있다.

If you see java.lang.OutOfMemoryError: PermGen space errors, you need to increase the permanent generation space available to Eclipse.

PermGen is the permanent generation of objects in the VM (Class names, internalized strings, objects that will never get garbage-collected). An easy, if somewhat memory-hungry fix is to enlarge the maximum space for these objects by adding

eclipse [normal arguments] -vmargs -XX:PermSize=64M -XX:MaxPermSize=128M [more VM args]
The arguments after -vmargs are directly passed to the VM. Run java -X for the list of options your VM accepts. Options starting with -X are implementation-specific and may not be applicable to all VMs.

You can also put the extra options in eclipse.ini.




Eclipse 3.3 and Sun VMs on Windows
Eclipse 3.3 supports a new argument to the launcher: --launcher.XXMaxPermSize. On Windows, Eclipse 3.3 ships with the following lines in the eclipse.ini file:

--launcher.XXMaxPermSize
256m
With the above arguments, if the VM being used is a Sun VM and there is not already a -XX:MaxPermSize= VM argument, then the launcher will automatically add -XX:MaxPermSize=256m to the list of VM arguments being used. The 3.3 launcher is only capable of identifying Sun VMs on Windows.

Note: Eclipse 3.3.1 has a bug where the launcher cannot detect a Sun VM, and therefore does not use the correct PermGen size. It seems this may have been a known bug on Mac OS X for 3.3.0 as well. If you are using either of these platform combinations, add the -XX flag to the eclipse.ini as described above.

The best way to really eliminate PermGen problems is to run Eclipse against non-Sun JVM, e.g. IBM J9 and BEA WebRockit. Note that while "normal" download of Windows version of IBM JVM is intended only for upgrade of old IBM computers, IBM site contains special distribution of Eclipse prepackaged with IBM JVM. You may use thisdistribution directly of extract JVM from it. Note that you need not install the same JVM int JRE list inside Eclipse if you do not wish to,



여기서도 나오는데 가장 좋은 방법이 Sun VM 을 사용하지 말고
BEA의 WebRockit 같은걸 사용하라는 거다.

eclipse.exe 의 바로가기를 생성한다. 바로가기를 생성한 후 바로가기의 속성을 보면 대상이라는 항목이 있는데 경로\eclipse.exe 라고 되있을 것이다.
뒤에 -vm C:\J\RK\R27.4\bin\javaw.exe 와 같은 식으로 JRockit 의 경로를 vm 옵션으로 넣어준다.





[바로가기 링크] : http://coolx.net/cboard/develop/459



Name
Password
Comment
Copyright © 1999-2017, swindler. All rights reserved. 367,611 visitor ( 1999.1.8-2004.5.26 ), 2,405,771 ( -2017.01.31)

  2HLAB   2HLAB_Blog   RedToolBox   Omil   Omil_Blog