From 0d173ebfb9312b9f268c03af1c5b499b0b3cd8a9 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Tue, 21 Jun 2011 01:36:18 +0000 Subject: [PATCH] bug fixes...still doesn't work --- Robust/src/Runtime/bamboo/multicoregarbage.c | 3 +++ Robust/src/Runtime/bamboo/multicoregarbage.h | 4 ++++ Robust/src/Runtime/bamboo/multicoremem.c | 3 +-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Robust/src/Runtime/bamboo/multicoregarbage.c b/Robust/src/Runtime/bamboo/multicoregarbage.c index 474033e8..c23a78dd 100644 --- a/Robust/src/Runtime/bamboo/multicoregarbage.c +++ b/Robust/src/Runtime/bamboo/multicoregarbage.c @@ -108,6 +108,9 @@ void initmulticoregcdata() { allocationinfo.blocktable[i].corenum=0; else allocationinfo.blocktable[i].corenum=gc_block2core[(i%(NUMCORES4GC*2))]; + allocationinfo.blocktable[i].status=BS_FREE; + allocationinfo.blocktable[i].usedspace=0; + allocationinfo.blocktable[i].freespace=GLOBALBLOCKSIZE(i); } buildCore2Test(); } diff --git a/Robust/src/Runtime/bamboo/multicoregarbage.h b/Robust/src/Runtime/bamboo/multicoregarbage.h index d66261d7..94f8c183 100644 --- a/Robust/src/Runtime/bamboo/multicoregarbage.h +++ b/Robust/src/Runtime/bamboo/multicoregarbage.h @@ -233,6 +233,10 @@ INLINE static unsigned int hostcore(void * ptr) { #define BLOCKSIZE(c) \ ((c)?BAMBOO_SMEM_SIZE_L:BAMBOO_SMEM_SIZE) +//This macro takes in a local block number and returns the size of the block +#define GLOBALBLOCKSIZE(c) \ + ((c