[svn:parrot] r47995 - in branches/gc_massacre: docs/pdds src/gc

jkeenan at svn.parrot.org jkeenan at svn.parrot.org
Mon Jul 5 01:11:51 UTC 2010


Author: jkeenan
Date: Mon Jul  5 01:11:51 2010
New Revision: 47995
URL: https://trac.parrot.org/parrot/changeset/47995

Log:
[codingstd] Correct POD formatting errors in PDDs.  Reformat some C++ style comments.

Modified:
   branches/gc_massacre/docs/pdds/pdd09_gc.pod
   branches/gc_massacre/src/gc/fixed_allocator.c
   branches/gc_massacre/src/gc/gc_ms2.c
   branches/gc_massacre/src/gc/gc_tms.c

Modified: branches/gc_massacre/docs/pdds/pdd09_gc.pod
==============================================================================
--- branches/gc_massacre/docs/pdds/pdd09_gc.pod	Mon Jul  5 01:03:29 2010	(r47994)
+++ branches/gc_massacre/docs/pdds/pdd09_gc.pod	Mon Jul  5 01:11:51 2010	(r47995)
@@ -274,7 +274,7 @@
 
 =item C<Buffer* (*allocate_bufferlike_header)(PARROT_INTERP, size_t size)>
 
-=item C<void    (*free_bufferlike_header)(PARROT_INTERP, Buffer*, size_t size)>
+=item C<void (*free_bufferlike_header)(PARROT_INTERP, Buffer*, size_t size)>
 
 =item C<int  (*is_pmc_ptr)(PARROT_INTERP, void*)>
 
@@ -299,21 +299,23 @@
 
 Free an attribute structure back to the system.
 
-=item C<void (*allocate_string_storage)(PARROT_INTERP, STRING *str, size_t size)>
+=item C<void (*allocate_string_storage)
+(PARROT_INTERP, STRING *str, size_t size)>
 
 Allocate buffer storage for a string.
 
-=item C<void (*reallocate_string_storage)(PARROT_INTERP, STRING *str, size_t size)>
+=item C<void (*reallocate_string_storage)
+(PARROT_INTERP, STRING *str, size_t size)>
 
 Resize existing string storage to fit data of the new size.
 
-=item C<void (*allocate_buffer_storage)(PARROT_INTERP, ARGMOD(Buffer *buffer),
-size_t nsize)>
+=item C<void (*allocate_buffer_storage)
+(PARROT_INTERP, ARGMOD(Buffer *buffer), size_t nsize)>
 
 Allocate buffer storage for any purpose.
 
-=item C<void (*reallocate_buffer_storage)(PARROT_INTERP, ARGMOD(Buffer *buffer),
-size_t newsize)>
+=item C<void (*reallocate_buffer_storage)
+(PARROT_INTERP, ARGMOD(Buffer *buffer), size_t newsize)>
 
 Reallocate or resize existing buffer storage.
 

Modified: branches/gc_massacre/src/gc/fixed_allocator.c
==============================================================================
--- branches/gc_massacre/src/gc/fixed_allocator.c	Mon Jul  5 01:03:29 2010	(r47994)
+++ branches/gc_massacre/src/gc/fixed_allocator.c	Mon Jul  5 01:11:51 2010	(r47995)
@@ -134,7 +134,9 @@
         allocator->pools[index] = Parrot_gc_pool_new(interp, alloc_size);
 
     ret = pool_allocate(allocator->pools[index]);
-    //memset(ret, 0, alloc_size);
+    /*
+     * memset(ret, 0, alloc_size);
+     */
     return ret;
 }
 

Modified: branches/gc_massacre/src/gc/gc_ms2.c
==============================================================================
--- branches/gc_massacre/src/gc/gc_ms2.c	Mon Jul  5 01:03:29 2010	(r47994)
+++ branches/gc_massacre/src/gc/gc_ms2.c	Mon Jul  5 01:11:51 2010	(r47995)
@@ -440,7 +440,9 @@
         char * const mem = (char *)mem_internal_allocate(size);
 
         Buffer_bufstart(str) = str->strstart = mem;
-        // FIXME Packfile pack garbage from string tail...
+        /*
+         * FIXME Packfile pack garbage from string tail...
+         */
         memset(mem, 0, size);
     }
     else {
@@ -877,9 +879,10 @@
     gc_ms2_sweep_pool(interp, self->pmc_allocator, self->objects, gc_ms2_sweep_pmc_cb);
     gc_ms2_sweep_pool(interp, self->string_allocator, self->strings, gc_ms2_sweep_string_cb);
 
-    /* Wait more next time */
-    // FIXME With such simplistic approach we reach multigigabyte liveset of objects
-    //self->gc_threshold *= UNITS_PER_ALLOC_GROWTH_FACTOR;
+    /* Wait more next time
+    FIXME With such simplistic approach we reach multigigabyte liveset of objects
+    self->gc_threshold *= UNITS_PER_ALLOC_GROWTH_FACTOR;
+     */
 
     self->stats.header_allocs_since_last_collect = 0;
     self->stats.gc_mark_runs++;

Modified: branches/gc_massacre/src/gc/gc_tms.c
==============================================================================
--- branches/gc_massacre/src/gc/gc_tms.c	Mon Jul  5 01:03:29 2010	(r47994)
+++ branches/gc_massacre/src/gc/gc_tms.c	Mon Jul  5 01:11:51 2010	(r47995)
@@ -658,7 +658,9 @@
     /* Put inside ASSERT wo it will not affect non-debug build */
     PARROT_ASSERT(Parrot_list_check(interp, self->dead_objects));
 
-    //fprintf(stderr, "Before %zd\n", self->dead_objects->count);
+    /*
+     * fprintf(stderr, "Before %zd\n", self->dead_objects->count);
+     */
 
     /*
     self.grey_objects  = self.trace_roots();
@@ -671,7 +673,9 @@
 
     gc_tms_mark_pmc_header(interp, PMCNULL);
 
-    //fprintf(stderr, "Roots %zd\n", self->grey_objects->count);
+    /*
+     * fprintf(stderr, "Roots %zd\n", self->grey_objects->count);
+     */
     PARROT_ASSERT(Parrot_list_check(interp, self->grey_objects));
 
     /*
@@ -687,7 +691,9 @@
         ++counter;
     }
 
-    //fprintf(stderr, "Processed grey: %zd\n", counter);
+    /*
+    fprintf(stderr, "Processed grey: %zd\n", counter);
+    */
 
     /*
     # Sweep
@@ -696,7 +702,9 @@
         self.allocator.free($dead);
     }
     */
-    //fprintf(stderr, "Killing %zd\n", self->dead_objects->count);
+    /*
+    fprintf(stderr, "Killing %zd\n", self->dead_objects->count);
+    */
     tmp = self->dead_objects->first;
     counter = 0;
     while (tmp) {
@@ -708,10 +716,11 @@
         ++counter;
         PARROT_ASSERT(counter <= self->dead_objects->count);
     }
-    //fprintf(stderr, "Processed dead %d\n", counter);
-
-    //fprintf(stderr, "Survived %zd\n", self->black_objects->count);
-    //fprintf(stderr, "Dead %d\n", self->dead_objects->count);
+    /*
+    fprintf(stderr, "Processed dead %d\n", counter);
+    fprintf(stderr, "Survived %zd\n", self->black_objects->count);
+    fprintf(stderr, "Dead %d\n", self->dead_objects->count);
+    */
 
     /* Clean up */
     Parrot_list_destroy(interp, self->grey_objects);
@@ -740,7 +749,9 @@
     self->black_objects = self->objects;
     self->objects = list;
 
-    //fprintf(stderr, "Appending %zd\n", self->black_objects->count);
+    /*
+    fprintf(stderr, "Appending %zd\n", self->black_objects->count);
+    */
     while ((tmp = Parrot_list_pop(interp, self->black_objects))) {
         PARROT_ASSERT(tmp->owner == self->black_objects);
         LIST_APPEND(self->objects, tmp);


More information about the parrot-commits mailing list