WAITFORGCPHASE(MARKPHASE);
GC_PRINTF("Start mark phase\n");
- mark(true, stackptr);
+ mark(stackptr);
GC_PRINTF("Finish mark phase, start compact phase\n");
compact();
GC_PRINTF("Finish compact phase\n");
WAITFORGCPHASE(MARKPHASE);
GC_PRINTF("Start mark phase\n");
- mark(true, stackptr);
+ mark(stackptr);
GC_PRINTF("Finish mark phase, wait for flush\n");
// non-gc core collector routine
}
void master_mark(struct garbagelist *stackptr) {
- bool isfirst = true;
GC_PRINTF("Start mark phase \n");
GC_SEND_MSG_1_TO_CLIENT(GCSTART);
gc_status_info.gcphase = MARKPHASE;
// mark phase
- while(MARKPHASE == gc_status_info.gcphase) {
- mark(isfirst, stackptr);
- isfirst=false;
- // check gcstatus
- checkMarkStatus();
- }
+ mark(stackptr);
}
void master_getlargeobjs() {
}
}
-void mark(bool isfirst, struct garbagelist * stackptr) {
- if(isfirst) {
- // enqueue root objs
- tomark(stackptr);
- }
+void mark(struct garbagelist * stackptr) {
+ // enqueue root objs
+ tomark(stackptr);
+
unsigned int isize = 0;
bool sendStall = false;
// mark phase
}
if(BAMBOO_NUM_OF_CORE == STARTUPCORE)
- return;
+ checkMarkStatus();
}
BAMBOO_CACHE_MF();
INLINE void tomark(struct garbagelist * stackptr);
INLINE void scanPtrsInObj(void * ptr, int type);
void markObj(void * objptr);
-void mark(bool isfirst, struct garbagelist * stackptr);
+void mark(struct garbagelist * stackptr);
#endif // MULTICORE_GC
#endif // BAMBOO_MULTICORE_GC_MARK_H