This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Explain the ggc term "mark"
- From: Ian Lance Taylor <iant at google dot com>
- To: Basile STARYNKEVITCH <basile at starynkevitch dot net>
- Cc: okellogg at users dot sourceforge dot net, gcc-patches at gcc dot gnu dot org
- Date: Sat, 26 Sep 2009 12:19:27 -0700
- Subject: Re: [PATCH] Explain the ggc term "mark"
- References: <1252436746.7094.7.camel@tidbit.site> <4AA6AA64.9020301@starynkevitch.net>
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