Redian新闻
>
Java里面可以暂时禁用Garbage Collection吗?
avatar
Java里面可以暂时禁用Garbage Collection吗?# Java - 爪哇娇娃
t*o
1
想重复测试一个数据,
不想受Garbage Collection的影响,
有什么办法能暂时禁用Garbage Collection吗?
avatar
d*r
2
既然你只是测试一下,
如果实在找不到解决方案的话,那找到JDK关于 gc 的source code,
改一下然后重新编译生成JDK的运行库,我想应该可以吧?

【在 t****o 的大作中提到】
: 想重复测试一个数据,
: 不想受Garbage Collection的影响,
: 有什么办法能暂时禁用Garbage Collection吗?

avatar
m*t
3

You can't disable gc (that would like disabling the brake
the your car), but you can play with the gc parameters to
prevent it from kicking in so often.

【在 t****o 的大作中提到】
: 想重复测试一个数据,
: 不想受Garbage Collection的影响,
: 有什么办法能暂时禁用Garbage Collection吗?

avatar
c*t
4
JVM run time has an option to disable the GC.

【在 t****o 的大作中提到】
: 想重复测试一个数据,
: 不想受Garbage Collection的影响,
: 有什么办法能暂时禁用Garbage Collection吗?

avatar
m*t
5

ft, how?

【在 c*****t 的大作中提到】
: JVM run time has an option to disable the GC.
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。