Intellij堆大小,初始堆大小设置为大于最大堆大小的值 [英] Intellij heap size, Initial heap size set to a larger value than the maximum heap size

查看:3246
本文介绍了Intellij堆大小,初始堆大小设置为大于最大堆大小的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Java的初学者,我刚开始使用Intellij作为我的IDE.

I'm a beginner in Java, and I just started using Intellij as my IDE.

当我使用它时,有时会延迟.

When I use it, sometimes it's delayed.

我将xms和xmx更改为较大的堆大小(xms = 1024,xmx = 2048),但是会引发错误.

I changed my xms and xmx for larger heap size (xms = 1024, xmx = 2048), but it throws an error.

所以,我回滚了.

错误消息是这样的:初始堆大小设置为大于最大堆大小的值".

The error message was something like this: "Initial heap size set to a larger value than the maximum heap size".

出什么问题了?

如果可能,如何增加最大堆大小?

If possible, how do I increase maximum heap size?

我正在使用笔记本电脑,它有8GB的内存. x64 Intellij.exe已使用.

I'm using a laptop and it has 8GB memory. x64 Intellij.exe used.

推荐答案

如果在2019.2更新后看到InteliJ中的此错误,是因为此更新将JVM XMX值更改为2048m,而没有检查可以允许XMS的相关值变得大于无效的最大XMX值并产生该错误.

If you are seeing this error in InteliJ after the 2019.2 update it is because the update changed the JVM XMX value to 2048m without checking the related values which can allow XMS to become larger than the max XMX value which is not valid and creates that error.

即对我来说,值是XMX = 6000m和XMS = 4096m,但是在2019.2更新之后,它们是XMX = 2048m和XMS = 4096m

i.e. The values for me had been XMX=6000m and XMS=4096m but after the 2019.2 update they were XMX=2048m and XMS=4096m

您将必须手动更改值,以使XMS等于或小于XMX.在Mac上,VM选项文件为〜/Library/Preferences/IntelliJIdea2019.2/idea.vmoptions

You will have to manually change the values so XMS is equal to or less than XMX. On Macs the VM options file is ~/Library/Preferences/IntelliJIdea2019.2/idea.vmoptions

注意:该路径假定您使用的是InteliJ 2019.2.版本.如果

NOTE: That path assumes you are on InteliJ version 2019.2. You will need to change that value in the path to the version you are on if

这篇关于Intellij堆大小,初始堆大小设置为大于最大堆大小的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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