There is still some confusion on my side. This time it is regarding the algorithmic complexity of mark-sweep-compact.
The complexity of the mark phase is linear to the live set. The complexity of the sweep phase is linear to the heap size. The complexity of the compact phase is linear to the live set. So the complexity of the mark-compact would be linear to the live set since you only deal with live objects. Why would you ever want to include the a sweep phase because the complexity of mark-sweep-compact is now linear to the heap size; a lot worse compared to 'linear to the live set'. Get rid of the sweep and complexity goes down to 'linear to the live set'. What is the added value of such an inefficient GC implementation? I'm sure there is value; but currently it doesn't compute. On Monday, August 14, 2017 at 8:47:01 AM UTC+3, Peter Veentjer wrote: > > I have been improving my gc knowledge and there is some confusion on my > side regarding the 'mark-sweep-compact' algorithm I frequently see > mentioned in posts, articles and some not too formal books on the topic. > E.g. > > > https://plumbr.eu/handbook/garbage-collection-algorithms/removing-unused-objects/compact > https://www.infoq.com/news/2015/12/java-garbage-collection-minibook > > AFAIK mark-sweep-compact is not correct. It is either mark-sweep or > mark-compact where as part of the compacting process the dead objects are > removed. When I check more formal literature like "The Garbage Collection > Handbook: the Art of Automatic Memory Management", then there is no > mentioning of mark-sweep-compact. > > So I guess that when 'mark-sweep-compact' is mentioned, they are actually > referring to 'mark-compact'. Is this assumption correct? > > -- You received this message because you are subscribed to the Google Groups "mechanical-sympathy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/mechanical-sympathy/01237fa5-58ba-4aee-b44f-9fb8de4724c9%40googlegroups.com.
