A. Modify the configuration file
Navigate to the bin directory of the installation IDEA, find idea64.exe.vmoptions, I am a 64-bit, 32-bit modify idea.exe.vmoptions
take a look at 3 parameters Description:
-Xms 是最小启动内存参数
-Xmx 是最大运行内存参数
-XX:ReservedCodeCacheSize 保留代码占用的内存容量参数
8G memory configuration recommendations
-Xms512m
-Xmx1024m
-XX:ReservedCodeCacheSize=512m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-Djdk.http.auth.tunneling.disabledSchemes=""
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
16G memory configuration recommendations
-Xms1024m
-Xmx2048m
-XX:ReservedCodeCacheSize=1024m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-Djdk.http.auth.tunneling.disabledSchemes=""
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
Two .idea display real-time memory view
Open Settings, select Show memory indicator, display memory view