Re: My arguments

David Jeske <[email protected]> Wed, 13 Aug 2003 14:27:04 -0700
Newsgroups gmane.comp.gnome.mono.garbage-collection
Message-ID <20030813142704.A27971@mozart>
Here are my preferences:

1) mark-sweep
2) mark-compact
3) copying

I prefer mark-sweep to copying, because the real-world memory overhead
of fragmentation is generally lower than 2x, and it does less work
since it does not have to copy live data for every collection.

I prefer mark-compact over copying, because it uses less memory, and
has greater potential for incremental or concurrent work. 

IMO, compaction/copying is only useful in certain circumstances, for
example, preventing young-generation only objects from fragmenting the
heap, and making young-generation allocation really fast. The old
generation shouldn't use a copying collector, and it probably does not
need to be compacted.

This page by Hans Boehm sums up my thoughts pretty well:

  http://www.hpl.hp.com/personal/Hans_Boehm/gc/complexity.html

> The copying collection is simplier to implement than a Mark-Compact
> collector, but, in your opinion, What is the best?. I know that they are
> a lot of different implementations for this algorithms, but in general,
> What is the best for Mono from your point of view?.

IMO, copying collectors are good for small heaps such as in young
generations. Doing copying collection of a 200MB+ live heap is not
good.

> I think that i am going to start the first prototype with a Copying
> algorithm. After, modify it to make a Mark-Compact collector i think
> that won't be very complex.

If you prototype a copying collector, you can eventually use that as
the young generation and copy old objects into an old-generation which
uses mark-sweep with optional compaction.

-- 
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + [email protected]
_______________________________________________
Mono-gc-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-gc-list