如何在IntelliJ IDEA上增加内存堆大小? [英] How to increase the memory heap size on IntelliJ IDEA?

查看:5104
本文介绍了如何在IntelliJ IDEA上增加内存堆大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想分配大约1GB的堆大小,但我似乎无法弄明白。

I want to allocate around 1GB of heap size, but I can't seem to figure it out.

如何做到这一点?

推荐答案

使用帮助 | 编辑自定义VM选项...

编辑器将自动打开正确的 .vmoptions 文件,调整 -Xmx 的值,保存并重新启动IntelliJ IDEA:

An editor will open automatically for the right .vmoptions file, adjust the value of -Xmx, save and restart IntelliJ IDEA:

从IntelliJ IDEA知识库中查看这些文档了解更多信息详情:

Check these documents from IntelliJ IDEA knowledge base for more details:

  • Configuring JVM options and platform properties
  • The JVM could not be started. The main method may have thrown an exception.

下面的答案建议编辑 .vmoptions 直接在应用程序安装目录中的文件。请注意,不建议这样做,因为它会在补丁更新期间引起冲突。上述方法在 CONFIG 目录和IDE安装中创建该文件的副本保持不变。

Answers below suggest to edit .vmoptions file directly inside the application installation directory. Please note that it's not recommended since it will cause conflicts during patch updates. The method above creates a copy of the file in the CONFIG directory and your IDE installation remains intact.

还要注意32位 Windows上的地址空间限制,这使得很难使用高于 750m 的堆大小。如果您需要使用更大的堆,请确保首先切换到64位JVM ,否则IDE可能会在启动时崩溃或在工作期间随机开始崩溃。

Also be aware of the 32-bit address space limit on Windows which makes it hard to use heap sizes higher than 750m. Should you need to use larger heap, make sure to switch to the 64-bit JVM first, otherwise IDE may crash on start or start to crash randomly during work.

这篇关于如何在IntelliJ IDEA上增加内存堆大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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