a simulation of JVM Garbage Collection