Java里面可以暂时禁用Garbage Collection吗?# Java - 爪哇娇娃t*o2005-02-22 08:021 楼想重复测试一个数据,不想受Garbage Collection的影响,有什么办法能暂时禁用Garbage Collection吗?
d*r2005-02-22 08:022 楼既然你只是测试一下,如果实在找不到解决方案的话,那找到JDK关于 gc 的source code,改一下然后重新编译生成JDK的运行库,我想应该可以吧?【在 t****o 的大作中提到】: 想重复测试一个数据,: 不想受Garbage Collection的影响,: 有什么办法能暂时禁用Garbage Collection吗?
m*t2005-02-22 08:023 楼You can't disable gc (that would like disabling the brakethe your car), but you can play with the gc parameters toprevent it from kicking in so often.【在 t****o 的大作中提到】: 想重复测试一个数据,: 不想受Garbage Collection的影响,: 有什么办法能暂时禁用Garbage Collection吗?
c*t2005-02-22 08:024 楼JVM run time has an option to disable the GC.【在 t****o 的大作中提到】: 想重复测试一个数据,: 不想受Garbage Collection的影响,: 有什么办法能暂时禁用Garbage Collection吗?