more changes...think it is done...just need to wire it in to the build...
[IRC.git] / Robust / src / Runtime / bamboo / pmc_garbage.c
index 6e13da82ef32933437abf2e3a1b12835903222c5..4d0d747217643d0f377971b4be2a39b8fd899e9f 100644 (file)
@@ -29,12 +29,23 @@ void pmc_init() {
 
 void gc(struct garbagelist *gl) {
   pmc_init();
+  //mark live objects
   pmc_mark(gl);
+  //count live objects per unit
   pmc_count();
   tmc_spin_barrier_wait(&pmc_heapptr->barrier);
+  //divide up work
   if (BAMBOO_NUM_OF_THREADS==STARTUPCORE) {
     pmc_processunits();
   }
   tmc_spin_barrier_wait(&pmc_heapptr->barrier);
-  
+  //set up forwarding pointers
+  pmc_doforward();
+  tmc_spin_barrier_wait(&pmc_heapptr->barrier);
+  //update pointers
+  pmc_doreferenceupdate();
+  tmc_spin_barrier_wait(&pmc_heapptr->barrier);
+  //compact data
+  pmc_docompact();
+  tmc_spin_barrier_wait(&pmc_heapptr->barrier);
 }