[svn:parrot] r38729 - trunk/src/gc

whiteknight at svn.parrot.org whiteknight at svn.parrot.org
Tue May 12 23:58:44 UTC 2009


Author: whiteknight
Date: Tue May 12 23:58:43 2009
New Revision: 38729
URL: https://trac.parrot.org/parrot/changeset/38729

Log:
[docs] Add some function-level documentation to src/gc/generational_ms.c. I dont know what everything does, but I took some educated guesses

Modified:
   trunk/src/gc/generational_ms.c

Modified: trunk/src/gc/generational_ms.c
==============================================================================
--- trunk/src/gc/generational_ms.c	Tue May 12 23:33:10 2009	(r38728)
+++ trunk/src/gc/generational_ms.c	Tue May 12 23:58:43 2009	(r38729)
@@ -877,6 +877,8 @@
 =item C<static Gc_gms_gen * gc_gms_find_gen(PARROT_INTERP, const Gc_gms_hdr *h,
 UINTVAL gen_no)>
 
+Finds the generation associated with the given header and generation number.
+
 =cut
 
 */
@@ -914,6 +916,8 @@
 =item C<static void gc_gms_promote(PARROT_INTERP, Gc_gms_hdr *h, UINTVAL
 gen_no)>
 
+Promote the header to the specified generation.
+
 =cut
 
 */
@@ -961,6 +965,8 @@
 =item C<static void gc_gms_store_hdr_list(PARROT_INTERP, Gc_gms_hdr_list *l,
 Gc_gms_hdr *h)>
 
+Store the header into the header list.
+
 =cut
 
 */
@@ -993,6 +999,8 @@
 
 =item C<static void gc_gms_clear_hdr_list(PARROT_INTERP, Gc_gms_hdr_list *l)>
 
+Clear the header list and free it's memory to the OS.
+
 =cut
 
 */
@@ -1014,6 +1022,8 @@
 
 =item C<static void gc_gms_store_igp(PARROT_INTERP, Gc_gms_hdr *h)>
 
+Add the header to the inter-generational pointer list of it's generation.
+
 =cut
 
 */
@@ -1032,6 +1042,8 @@
 
 =item C<static void gc_gms_clear_igp(PARROT_INTERP, Gc_gms_gen *gen)>
 
+Clear the inter-generational pointer list of the given generation.
+
 =cut
 
 */
@@ -1122,6 +1134,8 @@
 =item C<static void gc_gms_merge_gen(PARROT_INTERP, Small_Object_Pool *pool, int
 flag, Gc_gms_plan *plan)>
 
+Merge black pointers to the previous generation, and update the free list.
+
 =cut
 
 */
@@ -1156,6 +1170,8 @@
 =item C<static void gc_gms_use_gen(PARROT_INTERP, Small_Object_Pool *pool, int
 flag, const Gc_gms_plan *plan)>
 
+Specify what generation to use by default.
+
 =cut
 
 */
@@ -1191,6 +1207,8 @@
 =item C<static int set_gen_cb(PARROT_INTERP, Small_Object_Pool *pool, int flag,
 void *arg)>
 
+Set the generation to use, merging if necessary.
+
 =cut
 
 */
@@ -1213,6 +1231,9 @@
 
 =item C<static void gc_gms_set_gen(PARROT_INTERP)>
 
+Setup the generations, deciding what to do based on the plan and moving
+headers around as necessary.
+
 =cut
 
 */
@@ -1484,6 +1505,8 @@
 =item C<static int init_mark_cb(PARROT_INTERP, Small_Object_Pool *pool, int
 flag, void *arg)>
 
+Initialization callback, initialize all the pointers.
+
 =cut
 
 */
@@ -1528,6 +1551,9 @@
 =item C<static int trace_igp_cb(PARROT_INTERP, Small_Object_Pool *pool, int
 flag, void *arg)>
 
+Trace through the IGP of the pool to find alive items that are pointing
+to items in other generations.
+
 =cut
 
 */
@@ -1577,6 +1603,8 @@
 =item C<static int trace_children_cb(PARROT_INTERP, Small_Object_Pool *pool, int
 flag, void *arg)>
 
+Trace through child objects
+
 =cut
 
 */
@@ -1683,6 +1711,8 @@
 =item C<static int sweep_cb_buf(PARROT_INTERP, Small_Object_Pool *pool, int
 flag, void *arg)>
 
+Sweep the buffer pool, freeing things that are dead.
+
 =cut
 
 */
@@ -1768,6 +1798,8 @@
 =item C<static int end_cycle_cb(PARROT_INTERP, Small_Object_Pool *pool, int
 flag, void *arg)>
 
+Reset the pointers in the pool at the end of the cycle.
+
 =cut
 
 */
@@ -1793,6 +1825,8 @@
 
 =item C<static void gc_gms_end_cycle(PARROT_INTERP)>
 
+End the cycle, resetting pointers in all pools.
+
 =cut
 
 */
@@ -1871,6 +1905,8 @@
 =item C<static void gms_debug_verify(PARROT_INTERP, Small_Object_Pool *pool,
 const char *action)>
 
+Debug function, check that everything is right.
+
 =cut
 
 */


More information about the parrot-commits mailing list