简体   繁体   English

如何增加STS(Spring Tool Suite)的内存大小?

[英]How to increase STS (Spring Tool Suite) memory size?

I am trying to increase heap size (memory) for the spring tool suite as I am getting out of memory. 我正在尝试增加spring工具套件的堆大小(内存),因为我内存不足。

If I increase from Xmx from 768m to 1024m I get the error "Failed to Create Java Virtual Machine". 如果我从Xmx从768m增加到1024m,我会收到错误“无法创建Java虚拟机”。

If I revert Xmx to 768m it works fine but I get OOM (Out of Memory). 如果我将Xmx恢复到768m它工作正常,但我得到OOM(Out of Memory)。 I have STS 2.9.2. 我有STS 2.9.2。 OS is win7. 操作系统是win7。

This is currently what I have in sts.ini at the moment. 这是我目前在sts.ini中所拥有的。

-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.2.R36x_v20101222
-product
com.springsource.sts.ide
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
384M
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms256m
-Xmx1024m
-Xss1m
-XX:PermSize=256m
-XX:MaxPermSize=1024m

what should I change? 我应该改变什么? Please advise. 请指教。

-startup
plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.401.v20161122-
1740
-product
org.springsource.sts.ide
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Xmx1024m

You should change only Xmx. 您应该只更改Xmx。 Here I am using Xmx1024m means STS is assigned with 1 GB Ram And Xmx4G means 4GB RAM. 这里我使用Xmx1024m意味着STS分配1 GB Ram而Xmx4G意味着4GB RAM。 You can check the heap status as 您可以将堆状态检查为

Open sts in Windows menu select Preferences then from General tab mark show heap status option. 在Windows菜单中打开sts选择Preferences然后从General选项卡标记show heap status选项。

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

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