Quanlong, If you are trying to understand the basic mark-sweep algorithm, you can download a previous revision such as rivision 570000, which has only two color bits for an object. One of the two bits stands for the allocation bit and the other stands for the mark bit. During collection, live objects will be marked at the according mark bit, and the allocation bit will be cleared. After this collection, the mark bit will be switched as the allocation bit, and the allocation bit will be the mark bit in the next collection. This kind of switch takes place after each collection.
After the concurrent GC, which is based on the basic mark-sweep, was added to Harmony, the color bits for an object were extended to be four. This is to represent the more statuses introduced by the concurrent GC algorithm. If you are interested, you can search and read related concurrent GC papers, or ask here. Thanks, Ligang On Wed, Sep 23, 2009 at 7:28 PM, Ramana Polavarapu <sriram...@gmail.com>wrote: > Sure, Tim. Thank you for the advice. However, this was filed in 1979. In > addition to that, my interest was in understanding the algorithm of four > colors in garbage collection but not in recommending it. In any event, > here > after, I shall not post links associated with patents. > > Regards, > > Ramana > > > -----Original Message----- > From: Tim Ellison [mailto:t.p.elli...@gmail.com] > Sent: Wednesday, September 23, 2009 4:36 PM > To: dev@harmony.apache.org > Subject: Re: [general]What's the meaning of 4 color bits in mark-sweep > collection algorithm > > Ramana, > > Please don't bring patents to our attention. If somebody has rights to a > patent that they would like to discuss with us then they can contact the > PMC > via the private list. We don't go actively searching for them. > > Regards, > Tim > > On 23/Sep/2009 05:20, Ramana Polavarapu wrote: > > Perhaps, this is the one that will unravel the mystery: > > http://www.patentstorm.us/patents/6289360/description.html > > Thank you. > > > > Regards, > > > > Ramana > > > > > > _____ > > > > From: quanlong [mailto:quanl...@mail.ustc.edu.cn] > > Sent: Wednesday, September 23, 2009 8:36 AM > > To: dev > > Subject: [general]What's the meaning of 4 color bits in mark-sweep > > collection algorithm > > > > > > Hi,everyone, > > In Harmony(version 608801),there are 4 color bits used in mark-sweep > > collection algorithm. > > What's the meaning of each color bit and the way in which they are > changed? > > > > Regards, > > quanlong > > > > 2009-09-23 > > _____ > > > > quanlong > > > > -- Ligang Wang China Runtime Technologies Lab, SSG/SSD/MRTC, Intel