From: bdemsky Date: Tue, 14 Jun 2011 06:39:33 +0000 (+0000) Subject: changes X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8ce473b2c663d2d3e7579b5fdbfc4dfc7066f081;p=IRC.git changes --- diff --git a/Robust/src/Runtime/bamboo/multicoregarbage.c b/Robust/src/Runtime/bamboo/multicoregarbage.c index 0aa25612..01572d64 100644 --- a/Robust/src/Runtime/bamboo/multicoregarbage.c +++ b/Robust/src/Runtime/bamboo/multicoregarbage.c @@ -522,7 +522,7 @@ INLINE void moveLObjs() { gc_lobjqueueinit4_I(); while(gc_lobjmoreItems4_I()) { ptr = (unsigned int)(gc_lobjdequeue4_I(&size, &host)); - ALIGNSIZE(size, &isize); + isize=ALIGNSIZE(size, &isize); if(remain >= isize) { remain -= isize; // move the large obj diff --git a/Robust/src/Runtime/bamboo/multicoregarbage.h b/Robust/src/Runtime/bamboo/multicoregarbage.h index 83e94575..5dd5ceeb 100644 --- a/Robust/src/Runtime/bamboo/multicoregarbage.h +++ b/Robust/src/Runtime/bamboo/multicoregarbage.h @@ -96,7 +96,6 @@ volatile unsigned int gcmovepending; // memory and will never be moved or garbage collected unsigned int * gcmappingtbl; unsigned int bamboo_rmsp_size; -unsigned int bamboo_baseobjsize; // table recording the starting address of each small block // (size is BAMBOO_SMEM_SIZE) @@ -133,7 +132,10 @@ unsigned int size_cachepolicytbl; #define ALIGNMENTBYTES 32 #define ALIGNMENTSHIFT 5 -#define ALIGNSIZE(x) (x>>ALIGNMENTSHIFT) +#define ALIGNOBJSIZE(x) (x>>ALIGNMENTSHIFT) + +#define ALIGNSIZE(s, as) (*((unsigned int*)as))=((((unsigned int)(s-1))&(~(BAMBOO_CACHE_LINE_MASK)))+(BAMBOO_CACHE_LINE_SIZE)) + // mapping of pointer to block # (start from 0), here the block # is // the global index