[concurrency-interest] Garbage First vs a counting collector

Florian Weimer fw at deneb.enyo.de
Thu Mar 26 17:20:54 EDT 2009

* Jeremy Manson:

> 3) In the case where you are writing to a region you haven't already
> written, it is 2) plus a memory write to record the fact that you are
> writing to another region.

> Even 3) is orders of magnitude cheaper than a CAS.  I'm not sure how
> expensive 4) is, but it doesn't happen all that often.

Depends on the CAS implementation.  CAS (and presumably atomic
increment/decrement on x86) on non-shared cache lines can be made
quite cheap.

One thing to consider is that reference counting only solves the
problem of reachability (ignoring cycles).  It does not help with

More information about the Concurrency-interest mailing list