是否可以动态更改最大Java堆大小?

时间:2021-01-25 17:19:42

I know you can set max heap size at startup using -Xmx but is it possible to change it dynamically during runtime?

我知道您可以使用-Xmx在启动时设置最大堆大小,但是可以在运行时动态更改它吗?

Is there any tool or (undocumented) api which will allow me to do that?

是否有任何工具或(未记录的)API可以让我这样做?

2 个解决方案

#1


No, it is not possible.

不,这是不可能的。

#2


Once the memory structure is fixed it cant be changed

一旦内存结构被修复,就无法改变

#1


No, it is not possible.

不,这是不可能的。

#2


Once the memory structure is fixed it cant be changed

一旦内存结构被修复,就无法改变