This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Explain the ggc term "mark"


2009-09-27  Oliver Kellogg  <okellogg@users.sourceforge.net>

	* ggc.h (gt_pointer_walker): Explain what "mark" means.



On Sat, 2009-09-26 at 12:19 -0700, Ian Lance Taylor wrote:
> 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
Index: ggc.h
===================================================================
--- ggc.h	(revision 152208)
+++ ggc.h	(working copy)
@@ -61,7 +61,8 @@
    function.  */
 extern void gt_pch_note_reorder (void *, void *, gt_handle_reorder);
 
-/* Mark the object in the first parameter and anything it points to.  */
+/* Mark (as alive) the object in the first parameter and anything it
+   points to.  */
 typedef void (*gt_pointer_walker) (void *);
 
 /* Structures for the easy way to mark roots.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]