From: bdemsky Date: Mon, 20 Jun 2011 02:20:55 +0000 (+0000) Subject: more changes X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f9756f835cdd8cb5c66db7c1c004385b8cfdd6b8;p=IRC.git more changes --- diff --git a/Robust/src/Runtime/bamboo/multicoregarbage.c b/Robust/src/Runtime/bamboo/multicoregarbage.c index 5478e09e..a253b8a1 100644 --- a/Robust/src/Runtime/bamboo/multicoregarbage.c +++ b/Robust/src/Runtime/bamboo/multicoregarbage.c @@ -122,18 +122,12 @@ void dismulticoregcdata() { void initGC() { if(STARTUPCORE == BAMBOO_NUM_OF_CORE) { - for(int i=0; igcmarkedptrbound) - gcmarkedptrbound=top; } // scan the pointers in object diff --git a/Robust/src/Runtime/bamboo/multicoremsg.c b/Robust/src/Runtime/bamboo/multicoremsg.c index c1520c89..ad673b94 100644 --- a/Robust/src/Runtime/bamboo/multicoremsg.c +++ b/Robust/src/Runtime/bamboo/multicoremsg.c @@ -505,8 +505,22 @@ void processmsg_returnmem_I() { unsigned int blockindex; BLOCKINDEX(blockindex, heaptop); struct blockrecord * blockrecord=&allocationinfo.blocktable[blockindex]; - if (cnum==blockrecord) { - //this is our own memory...need to clear our lower blocks + blockrecord->status=BS_FREE; + blockrecord->usedspace=(unsigned INTPTR)(heaptop-OFFSET2BASEVA(blockindex)); + /* Update the lowest free block */ + if (blockindex < allocationinfo.lowestfreeblock) { + blockindex=allocationinfo.lowestfreeblock; + } + + /* This is our own block...means we should mark other blocks above us as free*/ + if (cnum==blockrecord->corenum) { + unsigned INTPTR nextlocalblocknum=GLOBALBLOCK2LOCK(blockindex)+1; + for(;nextlocalblocknumstatus=BS_FREE; + nextblockrecord->usedspace=0; + } } }