--- /dev/null
+#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
#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
// 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();
#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;
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
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))