我有4G內存(64位)。目前,我在Eclipse IDE(JUNO)中使用默認內存設置。當我在JBoss 7.1
上部署應用程序時,出現Out Of Memory
錯誤。我想知道heap memory
和permgen memory
的memory ratio
?比方說,如果我爲堆內存設置1G內存,那麼Permgen內存將爲512M,就是例子。如果是這樣,permgen將是堆內存的50%。你能爲他們提供內存分配的方式嗎?如何正常爲4G分配堆和Permgen內存?
目前的eclipse.ini
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120522-1813
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
512M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
512m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Dhelp.lucene.tokenizer=standard
-Xms128m
-Xmx1024m
原因:
Caused by: java.lang.OutOfMemoryError: Java heap space
請修改它。因爲'java.lang.OutOfMemoryError:Java堆空間' – CycDemo
根據你的回答,我必須在'JBoss appclient.conf'中配置,因爲我在JBoss AS上部署應用程序時出現錯誤。 thz,我會嘗試。 – CycDemo