From: bdemsky Date: Fri, 24 Jun 2011 23:39:08 +0000 (+0000) Subject: bug fix X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=27ee8cab7aea2c7a96991b8e415feb42de27c87c;p=IRC.git bug fix --- diff --git a/Robust/src/Runtime/bamboo/multicoregccompact.c b/Robust/src/Runtime/bamboo/multicoregccompact.c index a7434d46..8c7b14d2 100644 --- a/Robust/src/Runtime/bamboo/multicoregccompact.c +++ b/Robust/src/Runtime/bamboo/multicoregccompact.c @@ -135,6 +135,7 @@ void compacthelper(struct moveHelper * orig,struct moveHelper * to) { senttopmessage=true; } unsigned int minimumbytes=compactblocks(orig, to); + if (orig->ptr==orig->bound) { //need more data to compact //increment the core @@ -326,7 +327,6 @@ unsigned int compactblocks(struct moveHelper * orig, struct moveHelper * to) { //Scan more carefully next objlength=getMarkedLength(origptr); - if (objlength!=NOTMARKED) { unsigned int length=ALIGNSIZETOBYTES(objlength); void *endtoptr=toptr+length; diff --git a/Robust/src/Runtime/bamboo/multicoregcflush.c b/Robust/src/Runtime/bamboo/multicoregcflush.c index 740f7a25..4706c6a6 100644 --- a/Robust/src/Runtime/bamboo/multicoregcflush.c +++ b/Robust/src/Runtime/bamboo/multicoregcflush.c @@ -190,7 +190,7 @@ void * updateblocks(struct moveHelper * orig, struct moveHelper * to) { if (!gcmarktbl[arrayoffset]) { do { arrayoffset++; - if (arrayoffset=origendoffset) { //finished with block... origptr=origbound; orig->ptr=origptr; @@ -213,17 +213,18 @@ void * updateblocks(struct moveHelper * orig, struct moveHelper * to) { orig->ptr=origptr; return dstptr; } - + /* Move the object */ if(origptr <= endtoptr) { memmove(dstptr, origptr, length); } else { memcpy(dstptr, origptr, length); } - + /* Update the pointers in the object */ updatePtrsInObj(dstptr); + /* Clear the mark */ clearMark(origptr); diff --git a/Robust/src/Runtime/mem.c b/Robust/src/Runtime/mem.c index 29c7e4d0..1e2e1a5f 100644 --- a/Robust/src/Runtime/mem.c +++ b/Robust/src/Runtime/mem.c @@ -21,6 +21,7 @@ void * mycalloc_share(struct garbagelist * stackptr, int size) { gc(stackptr); } p = BAMBOO_SHARE_MEM_CALLOC(isize); // calloc(m, isize); + if(p == NULL) { // no more global shared memory if(hasgc < 5) {