From: bdemsky Date: Thu, 25 Jun 2009 23:40:42 +0000 (+0000) Subject: add garbage collection support to delaycomp X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5629ea8d4c125a6e6a0c10c818663d3699f09cc1;p=IRC.git add garbage collection support to delaycomp --- diff --git a/Robust/src/Runtime/garbage.c b/Robust/src/Runtime/garbage.c index 88bbdd3d..79948c2c 100644 --- a/Robust/src/Runtime/garbage.c +++ b/Robust/src/Runtime/garbage.c @@ -19,6 +19,10 @@ #ifdef STM #include "tm.h" #endif +#ifdef DELAYCOMP +#include "delaycomp.h" +#endif + #define NUMPTRS 100 @@ -291,6 +295,10 @@ void collect(struct garbagelist * stackptr) { pthread_cond_wait(&gccond, &gclistlock); } #endif +#ifdef DELAYCOMP + ptrstack.prev=stackptr; + stackptr=(struct garbagelist *) &ptrstack; +#endif #ifdef GARBAGESTATS { @@ -625,6 +633,11 @@ void checkcollect2(void * ptr) { #endif void stopforgc(struct garbagelist * ptr) { +#ifdef DELAYCOMP + //just append us to the list + ptrstack.prev=ptr; + ptr=(struct garbagelist *) &ptrstack; +#endif #ifndef MAC litem.stackptr=ptr; #ifdef THREADS