IDEA 闪退报错:There is not enough memory to perform the requested operation. please increase Xmx ...

一、问题描述

Idea通过push上传代码到github上,结果报错如下:

IDEA 闪退报错:There is not enough memory to perform the requested operation. please increase Xmx ..._第1张图片

二、问题原因

-Xmx内存较大1024MB,超出了idea中设定值,idea默认的设定阈值在idea64.exe.vmoptions文件中,如下图
"..\JetBrains\IntelliJ IDEA 2016.2.2\bin\idea64.exe.vmoptions"中的设定值800MB:

IDEA 闪退报错:There is not enough memory to perform the requested operation. please increase Xmx ..._第2张图片
所以解决办法就是,修改运行时的参数,即修改idea.exe.vmoptions对应选项,减少该值。

三、解决办法

修改运行时的参数,在idea.exe.vmoptions文件中,即"...\JetBrains\IntelliJ IDEA 2016.2.2\bin\idea.exe.vmoptions"中-Xmx值为628MB,稍微减小一些,随自己心意设置。但是,这个值越小,IDEA运行速度越慢,所以慎重

-server
-Xms128m
-Xmx628m
-XX:ReservedCodeCacheSize=240m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow


 

你可能感兴趣的:(idea,IDEA,闪退,Xmx)