perl.cvs.parrot
[Top] [All Lists]

[svn:parrot] r28499 - branches/gsoc_pdd09/src/dynpmc

Subject: [svn:parrot] r28499 - branches/gsoc_pdd09/src/dynpmc
From:
Date: Tue, 17 Jun 2008 19:11:11 -0700 PDT
Newsgroups: perl.cvs.parrot

Author: Whiteknight
Date: Tue Jun 17 19:11:10 2008
New Revision: 28499

Modified:
   branches/gsoc_pdd09/src/dynpmc/gcaccess.pmc

Log:
[gsoc_pdd09] A few small fixes, updates, and a new method for the GCAccess PMC.

Modified: branches/gsoc_pdd09/src/dynpmc/gcaccess.pmc
==============================================================================
--- branches/gsoc_pdd09/src/dynpmc/gcaccess.pmc (original)
+++ branches/gsoc_pdd09/src/dynpmc/gcaccess.pmc Tue Jun 17 19:11:10 2008
@@ -37,6 +37,16 @@
         RETURN(INTVAL i);
     }
 
+    METHOD free_pmcs() {
+        INTVAL i = 0;
+        Small_Object_Pool * pmcpool = interp->arena_base->pmc_pool;
+        Gc_it_hdr * hdr = pmcpool->free_list;
+        if(hdr == NULL)
+            RETURN(INTVAL 0);
+        while(hdr = hdr->next) i++;
+        RETURN(INTVAL i);
+    }
+
     METHOD items_in_root_queue() {
         INTVAL i = 0;
         Gc_it_data * gc_priv_data = interp->arena_base->gc_private;
@@ -54,7 +64,7 @@
     METHOD run_increment() {
         Gc_it_data *gc_data = interp->arena_base->gc_private;
         Parrot_do_dod_run(interp, 0);
-        RETURN(INTVAL gc_data->item_count;
+        RETURN(INTVAL gc_data->item_count);
     }
 
     METHOD run_complete() {
@@ -64,6 +74,7 @@
         } while(gc_data->state != GC_IT_READY);
         RETURN(INTVAL gc_data->total_items)
     }
+}
 
 /*
  * Local variables:

<Prev in Thread] Current Thread [Next in Thread>
  • [svn:parrot] r28499 - branches/gsoc_pdd09/src/dynpmc, Whiteknight <=