简体   繁体   English

我该如何设置IntelliJ 14的内存?

[英]How should I set the memory for IntelliJ 14?

I just upgraded my IntelliJ to 14.0.3. 我刚刚将IntelliJ升级到14.0.3。 But there's always a Out Of Memory dialog popped up to ask me to set the memory. 但是总会出现一个Out Of Memory对话框,要求我设置内存。

Following is my settings: 以下是我的设置: 在此输入图像描述

I thought it's enough. 我觉得这就够了。 But the dialog shows from time to time, and sometimes, it's no responding that I have to shutdown it. 但是对话框不时会显示,有时,我不得不关闭它。

How should set this for IntelliJ 14? 如何为IntelliJ 14设置此项? Any ideas? 有任何想法吗?

Open Intellij IDE's vmoptions file 打开Intellij IDE的vmoptions文件

For Mac Users 对于Mac用户

Help | Edit Custom VM Options...

or 要么

Library > Preferences > Idea<YourVersion> > idea.vmoptions

For Window (32bit) Users 对于Window(32位)用户

C:\\Program Files (x86)\\JetBrains\\IntelliJ IDEA <your_version> \\bin\\idea.exe.vmoptions C:\\ Program Files(x86)\\ JetBrains \\ IntelliJ IDEA <your_version> \\ bin \\ idea.exe.vmoptions

For Window (64bit) Users 对于Window(64位)用户

C:\\Program Files (x86)\\JetBrains\\IntelliJ IDEA <your_version> \\bin\\idea64.exe.vmoptions C:\\ Program Files(x86)\\ JetBrains \\ IntelliJ IDEA <your_version> \\ bin \\ idea64.exe.vmoptions

and setup it's memory as you wish. 并根据需要设置它的内存。 Below is sample settings for 2GB 以下是2GB的示例设置

-Xms128m
-Xmx2048m
-XX:MaxPermSize=350m
-XX:ReservedCodeCacheSize=240m
-XX:+UseCodeCacheFlushing
-XX:+UseCompressedOops

Hopefully this help. 希望这有帮助。

I have allocated 4 GB to intelliJ 14 on windows 7. My settings in idea64.exe.vmoptions are : 我在Windows 7上为intelliJ 14分配了4 GB。我在idea64.exe.vmoptions中的设置是:

-Xms4608m -Xms4608m
-Xmx4608m -Xmx4608m
-Xmn2g -Xmn2g
-Xss128k -Xss128k
-XX:MaxPermSize=1536m -XX:MaxPermSize参数=1536米
-XX:ParallelGCThreads=20 -XX:ParallelGCThreads = 20

You can set IntelliJ IDEA's memory settings and your application's memory settings in the following places: 您可以在以下位置设置IntelliJ IDEA的内存设置应用程序的内存设置:

IDEA's vmoptions file: IDEA的vmoptions文件:

Under Windows it could be either of the followings, depending on which installation (x86, x64) you use: 在Windows下,它可以是以下任一种,具体取决于您使用的安装(x86,x64):

  • C:\\Program Files (x86)\\JetBrains\\IntelliJ IDEA 2016.3.4\\bin\\idea.exe.vmoptions C:\\ Program Files(x86)\\ JetBrains \\ IntelliJ IDEA 2016.3.4 \\ bin \\ idea.exe.vmoptions
  • C:\\Program Files (x86)\\JetBrains\\IntelliJ IDEA 2016.3.4\\bin\\idea64.exe.vmoptions C:\\ Program Files(x86)\\ JetBrains \\ IntelliJ IDEA 2016.3.4 \\ bin \\ idea64.exe.vmoptions

VM Options in the Run/Debug Configuration: 运行/调试配置中的VM选项:

在此输入图像描述

If you still see this popup frequently even with high memory allocated, try: 如果即使分配了高内存仍然经常看到此弹出窗口,请尝试:

File > Invalidate Caches / Restart... 文件>无效缓存/重新启动...

It really depends on the nature of the error. 这实际上取决于错误的性质。 One thing to try is using idea64.exe instead of idea.exe. 要尝试的一件事是使用idea64.exe而不是idea.exe。

If this doesn't help, please contact JetBrains by filing an issue to https://youtrack.jetbrains.com/newissue and attach your log there (Help | Show log). 如果这没有帮助,请通过向https://youtrack.jetbrains.com/newissue提交问题联系JetBrains并在那里附上您的日志(帮助|显示日志)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM