From f9756f835cdd8cb5c66db7c1c004385b8cfdd6b8 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Mon, 20 Jun 2011 02:20:55 +0000 Subject: [PATCH] more changes --- Robust/src/Runtime/bamboo/multicoregarbage.c | 11 -------- Robust/src/Runtime/bamboo/multicoregarbage.h | 8 +++--- .../src/Runtime/bamboo/multicoregccompact.c | 27 ++++++++++++------- Robust/src/Runtime/bamboo/multicoregcmark.c | 4 --- Robust/src/Runtime/bamboo/multicoremsg.c | 18 +++++++++++-- 5 files changed, 39 insertions(+), 29 deletions(-) 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; + } } } -- 2.34.1