java - How to make JVM hang for a given time period? -


i trying simulate gc in local environment. there way can make jvm hang 5 mins?

if on linux system (most other unixes have this), can do

pkill -stop java; sleep $(( 5 * 60 )); pkill -cont java 

to pause java process 5 minutes.

pkill -tstp java; sleep $(( 5 * 60 )); pkill -cont java 

is less agressive.

but nowhere garbage collector break.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - How can I echo out this array? -

javascript - IE11 incompatibility with jQuery's 'readonly'? -