I am writing a Java program and at some point during runtime I want to change the JVM settings (reduce the heap) and after a while increase it again. Is this possible with Java?
In short: you cannot. The heap size is fixed after it starts, and there is no way to change it from the code.
, , , , -Xmx -Xms. : -XX: MaxHeapFreeRatio: (70 , ) , , , GC .
-Xms ( GC), .
, , , GC aka stop-the-world events, .
Source: https://habr.com/ru/post/1531737/More articles:rgl.snapshot creates a black file - rНе удается найти службу при попытке дистанционной остановки через Powershell/MSBuild - powershellShow a small popup at the point where the user clicks on the graph (achartengine) - androidPowershell stop-service error: cannot find service with service name - powershellнасколько надежным является $_SERVER [ "REMOTE_PORT" ] при определении пользовательского устройства? - phpPowershell denied Get-WmiObject - tfsSecuring a WCF Service Call Between Server Applications Using Federated Security - c #Отображение всплывающего окна при нажатии точки в графике AChartEngine - android$ _SERVER ['REMOTE_PORT'] gives no value - phpIntegration Testing with LocalDB - c #All Articles