From: bdemsky <bdemsky>
Date: Sat, 18 Jun 2011 08:38:55 +0000 (+0000)
Subject: get it to compile
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f136b27c51e22350784a3dc0b9355423c7e9ef16;p=IRC.git

get it to compile
---

diff --git a/Robust/src/Runtime/bamboo/bambooalign.h b/Robust/src/Runtime/bamboo/bambooalign.h
new file mode 100644
index 00000000..1ab1cbe5
--- /dev/null
+++ b/Robust/src/Runtime/bamboo/bambooalign.h
@@ -0,0 +1,14 @@
+#ifndef BAMBOOALIGN_H
+#define BAMBOOALIGN_H
+
+#define ALIGNMENTSIZE 32
+//Bytes to shift to get minimum alignment units                                 
+#define ALIGNMENTSHIFT 5
+#define NOTMARKED 0
+#define BITSPERALIGNMENT 2
+#define ALIGNOBJSIZE(x) (x)>>ALIGNMENTSHIFT
+#define ALIGNSIZETOBYTES(x) (x)<<ALIGNMENTSHIFT
+#define ALIGNTOTABLEINDEX(x) (x)>>(ALIGNMENTSHIFT+4)
+
+
+#endif
diff --git a/Robust/src/Runtime/bamboo/markbit.h b/Robust/src/Runtime/bamboo/markbit.h
index fd40bf16..e56354f0 100644
--- a/Robust/src/Runtime/bamboo/markbit.h
+++ b/Robust/src/Runtime/bamboo/markbit.h
@@ -1,27 +1,16 @@
 #ifndef MARKBIT_H
 #define MARKBIT_H
+#include "bambooalign.h"
 
 extern unsigned int markmappingarray[];
 extern unsigned int bitmarkmappingarray[];
 extern unsigned int revmarkmappingarray[];
 
-#define ALIGNMENTSIZE 32
-//Bytes to shift to get minimum alignment units
-#define ALIGNMENTSHIFT 5
-
-#define NOTMARKED 0
-#define BITSPERALIGNMENT 2
-#define ALIGNOBJSIZE(x) (x)>>ALIGNMENTSHIFT
-#define ALIGNSIZETOBYTES(x) (x)<<ALIGNMENTSHIFT
-#define ALIGNTOTABLEINDEX(x) (x)>>(ALIGNMENTSHIFT+4)
 #define CONVERTTABLEINDEXTOPTR(x) (((unsigned INTPTR)((x)<<(ALIGNMENTSHIFT+4)))+gcbaseva)
 //Minimum alignment unit
 
 
 
-
-
-
 #define OBJMASK 0x40000000  //set towhatever smallest object mark is
 #define MARKMASK 0xc0000000  //set towhatever smallest object mark is
 
diff --git a/Robust/src/Runtime/bamboo/multicoregarbage.c b/Robust/src/Runtime/bamboo/multicoregarbage.c
index 6250a82a..40b3d83f 100644
--- a/Robust/src/Runtime/bamboo/multicoregarbage.c
+++ b/Robust/src/Runtime/bamboo/multicoregarbage.c
@@ -565,10 +565,6 @@ void pregcprocessing() {
   // disable the timer interrupt
   bamboo_mask_timer_intr();
 #endif
-  // Zero out the remaining memory here because for the GC_CACHE_ADAPT version,
-  // we need to make sure during the gcinit phase the shared heap is not 
-  // touched. Otherwise, there would be problem when adapt the cache strategy.
-  BAMBOO_CLOSE_CUR_MSP();
 #if defined(GC_CACHE_ADAPT)&&defined(GC_CACHE_SAMPLING)
   // get the sampling data 
   bamboo_output_dtlb_sampling();
diff --git a/Robust/src/Runtime/mem.c b/Robust/src/Runtime/mem.c
index f9562f9f..9cc5884c 100644
--- a/Robust/src/Runtime/mem.c
+++ b/Robust/src/Runtime/mem.c
@@ -5,6 +5,8 @@
 #include "runtime_arch.h"
 
 #ifdef MULTICORE_GC
+#include "bambooalign.h"
+
 extern volatile bool gcflag;
 void * mycalloc_share(struct garbagelist * stackptr, int size) {
   void * p = NULL;
diff --git a/Robust/src/Runtime/mem.h b/Robust/src/Runtime/mem.h
index 128b64bd..2c47cbfb 100644
--- a/Robust/src/Runtime/mem.h
+++ b/Robust/src/Runtime/mem.h
@@ -27,8 +27,12 @@ void * mycalloc(int size, char * file, int line);
 void * mycalloc_i(int size, char * file, int line);
 void myfree(void * ptr);
 void myfree_i(void * ptr);
+
 #define RUNMALLOC(x) mycalloc(x,__FILE__,__LINE__) // handle interruption inside
+#define RUNCALLOC(x) mycalloc(x,__FILE__,__LINE__) // handle interruption inside
 #define RUNMALLOC_I(x) mycalloc_i(x,__FILE__,__LINE__) //with interruption blocked beforehand
+#define RUNCALLOC_I(x) mycalloc_i(x,__FILE__,__LINE__) //with interruption blocked beforehand
+
 #define RUNFREE(x) myfree(x)
 #define RUNFREE_I(x) myfree_i(x)
 #ifdef MULTICORE_GC
diff --git a/Robust/src/Runtime/runtime.h b/Robust/src/Runtime/runtime.h
index 8c2a010d..bbde3a1d 100644
--- a/Robust/src/Runtime/runtime.h
+++ b/Robust/src/Runtime/runtime.h
@@ -153,9 +153,6 @@ void createstartupobject();
 inline void run(int argc, char** argv);
 int receiveObject_I();
 void * smemalloc_I(int coren, int size, int * allocsize);
-#ifdef MULTICORE_GC
-inline void setupsmemmode(void);
-#endif
 #endif
 
 #if (defined(THREADS)||defined(MGC))