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

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

问题描述

我想分配大约 1GB 的堆大小,但我似乎无法弄清楚.

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

如何做到这一点?

推荐答案

使用帮助 |编辑自定义虚拟机选项...

一个编辑器会自动打开正确的.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:

下面的答案建议直接在应用程序安装目录中编辑 .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.

还要注意 Windows 上的 32 位 地址空间限制使得使用大于 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天全站免登陆