struct blockrecord * nextblockrecord=&allocationinfo.blocktable[blocknum];
if (nextblockrecord->status==BS_FREE) {
unsigned INTPTR freespace=nextblockrecord->freespace&~BAMBOO_CACHE_LINE_MASK;
-
if (freespace>=memcheck) {
nextblockrecord->status=BS_USED;
void *blockptr=OFFSET2BASEVA(blocknum)+gcbaseva;
void *startaddr=blockptr+usedspace;
gcrequiredmems[i]=0;
maxusefulmems[i]=0;
- if(BAMBOO_CHECK_SEND_MODE()) {
- cache_msg_2_I(corenum,GCMOVESTART,startaddr);
+ if (i==STARTUPCORE) {
+ gctomove = true;
+ gcmovestartaddr = startaddr;
+ } else if(BAMBOO_CHECK_SEND_MODE()) {
+ cache_msg_2_I(i,GCMOVESTART,startaddr);
} else {
- send_msg_2_I(corenum,GCMOVESTART,startaddr);
+ send_msg_2_I(i,GCMOVESTART,startaddr);
}
}
}
void getSpaceRemotely(struct moveHelper *to, unsigned int minimumbytes) {
//need to get another block from elsewhere
//set flag to wait for memory
+
if (BAMBOO_NUM_OF_CORE==STARTUPCORE) {
gctomove=false;
BAMBOO_ENTER_RUNTIME_MODE_FROM_CLIENT();
void *startaddr=handlegcfinishcompact_I(BAMBOO_NUM_OF_CORE, minimumbytes, gccurr_heaptop);
BAMBOO_ENTER_CLIENT_MODE_FROM_RUNTIME();
+
if (startaddr) {
gcmovestartaddr=startaddr;
} else {
senttopmessage=true;
}
unsigned int minimumbytes=compactblocks(orig, to);
-
if (orig->ptr==orig->bound) {
//need more data to compact
//increment the core
getSpace(to, minimumbytes);
}
}
-
if (BAMBOO_NUM_OF_CORE==STARTUPCORE) {
BAMBOO_ENTER_RUNTIME_MODE_FROM_CLIENT();
handlegcfinishcompact_I(BAMBOO_NUM_OF_CORE, 0, 0);
//tprintf("Decided to compact obj %x to %x\n", origptr, toptr);
gcmappingtbl[OBJMAPPINGINDEX(origptr)]=toptr;
+
origptr+=length;
toptr=endtoptr;
} else