4 ms·
The JVM (and I presume the CLR as well) has a couple of different garbage collectors that support concurrent (i.e. not stop-the-world) operation: http://java.s
by cemerick 17y ago
The JVM (and I presume the CLR as well) has a couple of different garbage collectors that support concurrent (i.e. not stop-the-world) operation:
http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning...
I'm no GC expert, but these get you good, fast, and mostly concurrent GC (in very high-pressure situations where one is running out of memory, then I think both fall back to a serialized stop-the-world last-ditch-effort).
- j_baker 17y agoIn fact, I believe that the JVM and the CLR both run GC in a different thread altogether.
- ig1 17y agoLuckily as it happens I am an expert in JVM Garbage Collectors :-). All of Sun Java's Garbage Collectors have a stop-the-world phase, the concurrent ones minimize the length of that stop-the-world period but it still has one. If you read the section on the concurrent collector on the link you posted you can see it says "During each major collection cycle, the concurrent collector will pause all the application threads for a brief period at the beginning of the collection and again toward the middle of the collection. The second pause tends to be the longer of the two pauses and multiple threads are used to do the collection work during that pause"