gclobjspare=tmp;
tmp->next = NULL;
tmp->prev = NULL;
- } // if (gclobjspare!=NULL)
+ } // if (gclobjspare!=NULL)
} // if (gclobjtailindex==NUMLOBJPTRS)
if(length != NULL) {
*length = gclobjtail->lengths[gclobjtailindex];
// this is the first time that this object is discovered,
// set the flag as DISCOVERED
((int *)objptr)[6] |= DISCOVERED;
+ BAMBOO_CACHE_FLUSH_RANGE_NO_FENCE(objptr, (7*sizeof(int)));
gc_enqueue_I(objptr);
}
BAMBOO_ENTER_CLIENT_MODE_FROM_RUNTIME();
BAMBOO_ENTER_CLIENT_MODE_FROM_RUNTIME();
// mark this obj
((int *)ptr)[6] = ((int *)ptr)[6] & (~DISCOVERED) | MARKED;
+ BAMBOO_CACHE_FLUSH_RANGE_NO_FENCE(ptr, (7*sizeof(int)));
} else if(isnotmarked) {
// ptr is an unmarked active object on this core
ALIGNSIZE(size, &isize);
#endif
// mark this obj
((int *)ptr)[6] = ((int *)ptr)[6] & (~DISCOVERED) | MARKED;
+ BAMBOO_CACHE_FLUSH_RANGE_NO_FENCE(ptr, (7*sizeof(int)));
if(ptr + size > gcmarkedptrbound) {
gcmarkedptrbound = ptr + size;
#endif
return;
}
- } // while(MARKPHASE == gcphase)
+ } // while(MARKPHASE == gcphase)
+
+ BAMBOO_CLEAN_DTLB();
+ BAMBOO_CACHE_MEM_FENCE_INCOHERENT();
} // mark()
inline void compact2Heaptophelper_I(int coren,
gcrequiredmems[i] = 0;
}
+ BAMBOO_CLEAN_DTLB();
+ BAMBOO_CACHE_MEM_FENCE_INCOHERENT();
+
#ifdef GC_PROFILE
gc_profileItem();
#endif
// BAMBOO_CLEAN_DTLB(): zero-out all the dtlb entries //
// BAMBOO_CACHE_FLUSH_L2(): Flush the contents of this tile's L2 back to //
// main memory //
+// BAMBOO_CACHE_FLUSH_RANGE_NO_FENCE(x, y): flush a range of mem without //
+// mem fence //
+// BAMBOO_CACHE_MEM_FENCE_INCOHERENT(): fence to guarantee visibility of //
+// stores to incoherent memory //
/////////////////////////////////////////////////////////////////////////////
#endif // #ifdef MULTICORE