![](/img/trans.png)
[英]Intellij heap size, Initial heap size set to a larger value than the maximum heap size
[英]Where should maximum heap size be configured in intellij?
在Preferences -> Compiler -> Java Compiler
我注意到可以配置其他命令行屬性和最大堆大小。
為了使這些生效,我重新啟動IntelliJ。 但是,我仍然在我的程序之一上Out of memory error
。
我還注意到idea.vmoptions
文件的設置仍然是:
~/Documents $ more /Applications/IntelliJ\ IDEA\ 12.app/bin/idea.vmoptions
-Xms128m
-Xmx750m
-XX:MaxPermSize=350m
-XX:ReservedCodeCacheSize=96m
-XX:+UseCodeCacheFlushing
-XX:+UseCompressedOops
題
我想使用UseConcMarkSweepGC
並將最大堆大小提高到4gb。 我應該在哪里做才能使其在IntelliJ中生效? 我正在使用Intellij12
只需使用TextEdit打開文件idea.vmoptions
並根據需要更改配置即可:)
-Xms128m
-Xmx4G // change this
-XX:MaxPermSize=350m
-XX:ReservedCodeCacheSize=96m
-XX:+UseCodeCacheFlushing
-XX:+UseCompressedOops
-XX:+UseConcMarkSweepGC // and add this
編譯器選項-執行Javac的選項。
但是有一個問題:為什么要給Idea這么大的堆?
如果在運行項目時擁有OOM,請嘗試更改“運行”選項(不是編譯器,也不是IDE)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.