From 5629ea8d4c125a6e6a0c10c818663d3699f09cc1 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Thu, 25 Jun 2009 23:40:42 +0000 Subject: [PATCH] add garbage collection support to delaycomp --- Robust/src/Runtime/garbage.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 -- 2.34.1