I am trying to increase heap size (memory) for the spring tool suite as I am getting out of memory.
If I increase from Xmx from 768m to 1024m I get the error "Failed to Create Java Virtual Machine".
If I revert Xmx to 768m it works fine but I get OOM (Out of Memory). I have STS 2.9.2. OS is win7.
This is currently what I have in sts.ini at the moment.
-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.
Here I am using Xmx1024m means STS is assigned with 1 GB Ram
And Xmx4G means 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.