From: bdemsky Date: Mon, 20 Jun 2011 10:14:43 +0000 (+0000) Subject: get it to compile again X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b88eb07f47f54f358d291a58ca5cc01df8a1fca9;p=IRC.git get it to compile again --- diff --git a/Robust/src/Runtime/bamboo/multicoregarbage.c b/Robust/src/Runtime/bamboo/multicoregarbage.c index 6d37942f..c2172ef3 100644 --- a/Robust/src/Runtime/bamboo/multicoregarbage.c +++ b/Robust/src/Runtime/bamboo/multicoregarbage.c @@ -3,7 +3,6 @@ #include "multicoreruntime.h" #include "multicoregarbage.h" #include "multicoregcmark.h" -#include "gcqueue.h" #include "multicoregccompact.h" #include "multicoregcflush.h" #include "multicoregcprofile.h" @@ -95,7 +94,6 @@ void initmulticoregcdata() { gcprecheck = true; gcforwardobjtbl = allocateMGCHash_I(128); - gcheaptop = 0; #ifdef MGC_SPEC gc_profile_flag = false; #endif @@ -135,7 +133,6 @@ void initGC() { gcnumsendobjs[0][i] = gcnumsendobjs[1][i] = 0; gcnumreceiveobjs[0][i] = gcnumreceiveobjs[1][i] = 0; } - gcheaptop = 0; gcnumsrobjs_index = 0; } gcself_numsendobjs = 0; diff --git a/Robust/src/Runtime/bamboo/multicoregarbage.h b/Robust/src/Runtime/bamboo/multicoregarbage.h index a3f6890c..2ba2550e 100644 --- a/Robust/src/Runtime/bamboo/multicoregarbage.h +++ b/Robust/src/Runtime/bamboo/multicoregarbage.h @@ -1,4 +1,4 @@ -m#ifndef BAMBOO_MULTICORE_GARBAGE_H +#ifndef BAMBOO_MULTICORE_GARBAGE_H #define BAMBOO_MULTICORE_GARBAGE_H #ifdef MULTICORE_GC #include "multicore.h" @@ -61,7 +61,6 @@ unsigned int gcself_numsendobjs; unsigned int gcself_numreceiveobjs; // for load balancing -unsigned int gcheaptop; unsigned INTPTR gcloads[NUMCORES4GC]; block_t numblockspercore; diff --git a/Robust/src/Runtime/bamboo/multicoregccompact.c b/Robust/src/Runtime/bamboo/multicoregccompact.c index 050b4d15..cbb1ba0f 100644 --- a/Robust/src/Runtime/bamboo/multicoregccompact.c +++ b/Robust/src/Runtime/bamboo/multicoregccompact.c @@ -4,6 +4,7 @@ #include "multicoreruntime.h" #include "multicoregarbage.h" #include "markbit.h" +#include "multicoremem_helper.h" int gc_countRunningCores() { int count=0; @@ -83,9 +84,9 @@ void getSpace(struct moveHelper *to, unsigned int minimumbytes) { void compacthelper(struct moveHelper * orig,struct moveHelper * to) { bool senttopmessage=false; while(true) { - if ((gcheaptop < ((unsigned INTPTR)(to->bound-to->ptr)))&&!senttopmessage) { + if ((gccurr_heaptop < ((unsigned INTPTR)(to->bound-to->ptr)))&&!senttopmessage) { //This block is the last for this core...let the startup know - send_msg_3(STARTUPCORE, GCRETURNMEM, BAMBOO_NUM_OF_CORE, to->ptr+gcheaptop); + send_msg_3(STARTUPCORE, GCRETURNMEM, BAMBOO_NUM_OF_CORE, to->ptr+gccurr_heaptop); //Only send the message once senttopmessage=true; } @@ -110,8 +111,7 @@ void compacthelper(struct moveHelper * orig,struct moveHelper * to) { } void * checkNeighbors(int corenum, unsigned INTPTR requiredmem) { - int minblockindex=allocation.lowestfreeblock/NUMCORES4GC; - block_t toplocalblock=topblock/NUMCORES4GC; + int minblockindex=allocationinfo.lowestfreeblock/NUMCORES4GC; for(int i=0;istatus=BS_USED; - void *blockptr=OFFSET2BASEVA(globalblockindex)+gcbaseva; + void *blockptr=OFFSET2BASEVA(i)+gcbaseva; unsigned INTPTR usedspace=((block->usedspace-1)&~BAMBOO_CACHE_LINE_MASK)+BAMBOO_CACHE_LINE_SIZE; allocationinfo.lowestfreeblock=firstfree; return blockptr+usedspace; @@ -160,7 +160,7 @@ void * globalSearch(unsigned int topblock) { /* should be invoked with interrupt turned off */ -void * gcfindSpareMem_I(unsigned int requiredmem,unsigned int requiredcore) { +void * gcfindSpareMem_I(unsigned INTPTR requiredmem,unsigned int requiredcore) { if (allocationinfo.lowestfreeblock!=NOFREEBLOCK) { //There are spare blocks unsigned int topblock=numblockspercore*NUMCORES4GC; @@ -216,7 +216,7 @@ unsigned int compactblocks(struct moveHelper * orig, struct moveHelper * to) { origptr=origbound; to->ptr=toptr; orig->ptr=origptr; - gcheaptop-=(unsigned INTPTR)(toptr-toptrinit) + gccurr_heaptop-=(unsigned INTPTR)(toptr-toptrinit); return 0; } } while(!gcmarktbl[arrayoffset]); @@ -230,7 +230,7 @@ unsigned int compactblocks(struct moveHelper * orig, struct moveHelper * to) { unsigned int length=ALIGNSIZETOBYTES(objlength); void *endtoptr=toptr+length; if (endtoptr>tobound) { - gcheaptop-=(unsigned INTPTR)(toptr-toptrinit) + gccurr_heaptop-=(unsigned INTPTR)(toptr-toptrinit); to->ptr=tobound; orig->ptr=origptr; return length; @@ -267,7 +267,7 @@ void master_compact() { gc_resetCoreStatus(); //initialize local data structures first....we don't want remote requests messing data up unsigned int initblocks=numblockspercore*NUMCORES4GC; - allocationinfo.lowestfreeblock=NOFREEBLOCKS; + allocationinfo.lowestfreeblock=NOFREEBLOCK; //assigned blocks for(int i=0;i