[PATCH] Explain the ggc term "mark"

Ian Lance Taylor iant@google.com
Sat Sep 26 19:22:00 GMT 2009


Basile STARYNKEVITCH <basile@starynkevitch.net> writes:

>> 2009-09-08  Oliver Kellogg  <okellogg@users.sourceforge.net>
>>
>>         * ggc.h (gt_pointer_walker): Explain what "mark" means.
>>
>>
>>
>
> -/* Mark the object in the first parameter and anything it points to.  */
> +/* Mark the object in the first parameter and anything it points to.
> +   Marked objects are protected from garbage collection.  */
>
> I would just say
>
> /* Mark (as alive) the bject in the first parameter and anything it
> points to. */
>
> But I am not a native English speaker, so perhaps your language is
> more natural.

I'll approve this change with Basile's sentence.  I find it clearer to
use the word "alive" than "protected".

(In general mark-and-sweep always implies marking objects which are
reachable.  There is no way to mark unreachable objects.  So I find no
ambiguity in the term "mark".  But making this clear in the comment is
fine.)

Thanks.

Ian



More information about the Gcc-patches mailing list