From: bdemsky Date: Thu, 17 Apr 2008 00:27:59 +0000 (+0000) Subject: changes and bug fixes X-Git-Tag: preEdgeChange~147 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=452c9aef7e8d1d2745db2354071d246013e02ece;p=IRC.git changes and bug fixes --- diff --git a/Robust/src/Runtime/DSTM/interface/dstmserver.c b/Robust/src/Runtime/DSTM/interface/dstmserver.c index 07dc2c83..18c1d0b8 100644 --- a/Robust/src/Runtime/DSTM/interface/dstmserver.c +++ b/Robust/src/Runtime/DSTM/interface/dstmserver.c @@ -672,6 +672,10 @@ int prefetchReq(int acceptfd) { oid = *((unsigned int *)(((char *)header) + sizeof(objheader_t) + offsetarry[i])); } + /* Don't continue if we hit a NULL pointer */ + if (oid==0) + break; + if((header = mhashSearch(oid)) == NULL) { size = sizeof(int) + sizeof(char) + sizeof(unsigned int) ; char sendbuffer[size]; diff --git a/Robust/src/Runtime/DSTM/interface/objstr.c b/Robust/src/Runtime/DSTM/interface/objstr.c index 991bd239..a8910138 100644 --- a/Robust/src/Runtime/DSTM/interface/objstr.c +++ b/Robust/src/Runtime/DSTM/interface/objstr.c @@ -60,11 +60,3 @@ void *objstrAlloc(objstr_t *store, unsigned int size) store = store->next; } } - -void clearObjStore() { - objstr_t *tmp = prefetchcache; - while(tmp != NULL) { - bzero(tmp+1, tmp->size); - tmp = tmp->next; - } -} diff --git a/Robust/src/Runtime/DSTM/interface/trans.c b/Robust/src/Runtime/DSTM/interface/trans.c index 4ffc9d25..3644d968 100644 --- a/Robust/src/Runtime/DSTM/interface/trans.c +++ b/Robust/src/Runtime/DSTM/interface/trans.c @@ -131,7 +131,13 @@ void prefetch(int ntuples, unsigned int *oids, unsigned short *endoffsets, short int top=endoffsets[ntuples-1]; *((int *)(node+len))=ntuples; len += sizeof(int); - + /* int i; + for(i=0;i oidMax || id < oidMin) { diff --git a/Robust/src/Runtime/runtime.c b/Robust/src/Runtime/runtime.c index 0bb81d2f..a5c78425 100644 --- a/Robust/src/Runtime/runtime.c +++ b/Robust/src/Runtime/runtime.c @@ -100,7 +100,6 @@ void CALL01(___System______printString____L___String___,struct ___String___ * __ #ifdef DSTM void CALL00(___System______clearPrefetchCache____) { - clearObjStore(); prehashClear(); } #endif