[platform] more educated guess on heap size for updater on x86 runtime, overridable (IDEA-242558)

GitOrigin-RevId: bcd74b9f89a83e4f8c4db888adf5311a4309f794
This commit is contained in:
Roman Shevchenko
2020-07-07 14:50:13 +00:00
committed by intellij-monorepo-bot
parent a33aeea8b5
commit 8cd79f9f80
@@ -176,8 +176,10 @@ internal object UpdateInstaller {
}
}
val mx = System.getProperty("idea.updater.heap")?.toInt() ?: if (SystemInfo.is32Bit) Runtime.getRuntime().maxMemory() shr 20 else 2000
args += File(java, if (SystemInfo.isWindows) "bin\\java.exe" else "bin/java").path
args += if (SystemInfo.is32Bit) "-Xmx1700m" else "-Xmx2000m"
args += "-Xmx${mx}m"
args += "-cp"
args += arrayOf(patchFiles.last().path, log4jCopy.path, jnaCopy.path, jnaUtilsCopy.path).joinToString(File.pathSeparator)