Reputation: 1437
I know there are different garbage collection algorithms. Those are Copy collection and Mark Compact collection, Incremental collection. I have a query now. Which algorithm is used in JVM? Why there are different algorithm available?
Upvotes: 6
Views: 2208
Reputation: 91
as jvm develops, more and more jvm algorithms appear to solve the lack of pre-one, now in JDK5.0 there area four types clollector:serial ,throught,concurrent and train collector
Upvotes: 0
Reputation: 24035
First off, there is more than one version of the JVM.
I believe most major JVM's are using a generational garbage collection by default. They may also use a hybrid strategy however.
Here are some links on major JVM's using generational garbage collection:
Here is a great article I found that indicates Jrockit uses a marking strategy: Comparison of three Major JVM's
Upvotes: 3
Reputation: 1506
Different garbage collectors have different strengths and weaknesses, important features are throughput, pause times and parallelization. Which garbage collectors are used or available depends on the JDK version, the JVM mode (client or server) and a ton of configuration settings you can use. Keep in mind that GC technology evolves. Here are some useful links:
Upvotes: 3