add garbage collector support...
authorbdemsky <bdemsky>
Mon, 28 Feb 2011 05:07:05 +0000 (05:07 +0000)
committerbdemsky <bdemsky>
Mon, 28 Feb 2011 05:07:05 +0000 (05:07 +0000)
Robust/src/Runtime/garbage.c

index 7acd62b2fe9515e0b34a6ac9247827aed07aa6a4..5197ca3d33b42dfeaeaa5eaa90bb004445dbc299 100644 (file)
@@ -380,7 +380,7 @@ void collect(struct garbagelist * stackptr) {
 #if defined(STM)||defined(THREADS)||defined(MLP)
   memorybase=NULL;
 #endif
+
   /* Check current stack */
 #if defined(THREADS)||defined(DSTM)||defined(STM)||defined(MLP)
   {
@@ -451,6 +451,17 @@ void collect(struct garbagelist * stackptr) {
   ENQUEUE(___fcrevert___, ___fcrevert___);
 #endif
 
+#if defined(THREADS)||defined(DSTM)||defined(STM)
+  {
+    int i;
+    stackptr=(struct garbagelist *)global_defs_p;
+    for(i=0; i<stackptr->size; i++) {
+      void * orig=stackptr->array[i];
+      ENQUEUE(orig, stackptr->array[i]);
+    }
+  }
+#endif
+
 #ifdef TASK
   {
     /* Update objectsets */