This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Explain the ggc term "mark"
- From: oliver dot kellogg at t-online dot de (Oliver Kellogg)
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 08 Sep 2009 21:05:46 +0200
- Subject: [PATCH] Explain the ggc term "mark"
- Reply-to: okellogg at users dot sourceforge dot net
Marking an object can mean either that it is marked for garbage
collection or that it is marked for protection against garbage
collection. It took me a bit of studying the code to find out that ggc
uses the first meaning.
2009-09-08 Oliver Kellogg <okellogg@users.sourceforge.net>
* ggc.h (gt_pointer_walker): Explain what "mark" means.
Index: ggc.h
===================================================================
--- ggc.h (revision 151529)
+++ 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 the object in the first parameter and anything it points to.
+ Marked objects are protected from garbage collection. */
typedef void (*gt_pointer_walker) (void *);
/* Structures for the easy way to mark roots.