Intellij idea堆大小无法更改 [英] Intellij idea Heap size can not be changed

查看:315
本文介绍了Intellij idea堆大小无法更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

总有一天,我运行了一些巨大的操作,然后弹出一个窗口,提示堆内存不足,我在该窗口中将其设置为2014M,然后单击继续".一切都很好.

Someday, I run something huge, and a window pop up said that heap memory out of memory, I set it to 2014M in that window, then click continue. Everything was fine.

但是我不喜欢数字2014,我希望它是2048.所以,我更改了idea64.exe.vmoptions中的-Xmx选项(如下所示)并重新启动了想法. (根据此 doc ),但是,什么都没有改变,堆大小仍为2014M.

But I don't like the number 2014, I want it 2048. So, I changed -Xmx option in idea64.exe.vmoptions (like below) and restarted idea. (According to this doc) However, nothing was changed, heap size was still 2014M.

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

然后,我更改了所有可以找到的idea64.exe.vmoptions,然后重新启动,但仍然失败.

Then, I changed all idea64.exe.vmoptions I could find, and restarted, and still failed.

操作系统:Windows 10 64位
想法版本:2018.1

OS: windows 10 64-bit
idea version: 2018.1

如何将堆大小更改为2048M?

How can I change the heap size to 2048M ?

请帮助,谢谢.

那天,我正在调试一些可以加密一些大对象的代码,并且在我使用copy value函数之后就显示了弹出窗口.

That day, I was debugging with some codes which encrypt some huge objects, and the popup showed just after I use copy value function.

我试图将IntelliJ Idea的JVM的堆大小更改为正式文档,但不起作用.

I tried to change the heap size of IntelliJ Idea's JVM as the official document, but not working.

堆内存统计信息在这里:

The heap memory statistic is here:

日志:

2018-07-23 09:54:04,184 [    224]   INFO -        #com.intellij.idea.Main - JVM Args: -Xms512m -Xmx2048m -XX:ReservedCodeCacheSize=240m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Djb.vmOptionsFile=C:\Users\huayu\.IntelliJIdea2018.1\config\idea64.exe.vmoptions -Didea.jre.check=true -Dide.native.launcher=true -Didea.paths.selector=IntelliJIdea2018.1 -XX:ErrorFile=C:\Users\huayu\java_error_in_idea_%p.log -XX:HeapDumpPath=C:\Users\huayu\java_error_in_idea.hprof 

推荐答案

较新版本的IDEA对vm选项使用不同的文件.旧版本曾经使用C:\ Program Files \ JetBrains \ IntelliJ IDEA {version} \ bin \ idea64.exe.vmoptions,但现在这些配置存在于C:\ Users {user} .IntelliJIdea {version} \ config \ idea64.exe中.vmoptions.

Newer versions of IDEA use a different file for vm options. Older versions used to use C:\Program Files\JetBrains\IntelliJ IDEA {version}\bin\idea64.exe.vmoptions but now these configurations exist in C:\Users{user}.IntelliJIdea{version}\config\idea64.exe.vmoptions.

您可以从IntelliJ转到此文件. 在帮助"菜单上,单击编辑自定义VM选项".然后重新启动IDEA,它应该会更新.

You can get to this file from IntelliJ. On the Help menu, click Edit Custom VM Options. Then restart IDEA and it should update.

注意:右下角显示的值似乎与您在配置文件中指定的值完全不匹配.不知道为什么.

Note: It doesn't look like the value displayed in the bottom right will exactly match what you specify in the config file. Not sure why.

另请参阅:如何增加内存堆IntelliJ IDEA的大小?

这篇关于Intellij idea堆大小无法更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆