From: bdemsky Date: Thu, 6 Dec 2007 23:08:53 +0000 (+0000) Subject: ran valgrind...found a few issues... X-Git-Tag: preEdgeChange~345 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=170dc56854beadc71e76f273d00c4c3349a52ea4;p=IRC.git ran valgrind...found a few issues... --- diff --git a/Robust/src/Runtime/DSTM/interface/ISSUESTOADDRESS b/Robust/src/Runtime/DSTM/interface/ISSUESTOADDRESS index e6e4ce9f..d9040032 100644 --- a/Robust/src/Runtime/DSTM/interface/ISSUESTOADDRESS +++ b/Robust/src/Runtime/DSTM/interface/ISSUESTOADDRESS @@ -1,5 +1,9 @@ High priority list ------------------------------------- +0) Fix objstr issues... + A) allocations always have to traverse to end of list + B) do we need to zero first?? -- need to check about this one, it may be okay + 1) Wrap all receive calls in loops A) Perhaps the best way is to just define a macro or function call that does this. Look at GETSIZE macro for example... diff --git a/Robust/src/Runtime/DSTM/interface/objstr.c b/Robust/src/Runtime/DSTM/interface/objstr.c index 08b3c571..90657338 100644 --- a/Robust/src/Runtime/DSTM/interface/objstr.c +++ b/Robust/src/Runtime/DSTM/interface/objstr.c @@ -4,6 +4,7 @@ objstr_t *objstrCreate(unsigned int size) { objstr_t *tmp = malloc(sizeof(objstr_t) + size); tmp->size = size; + tmp->next = NULL; tmp->top = tmp + 1; //points to end of objstr_t structure! return tmp; } @@ -49,6 +50,7 @@ void *objstrAlloc(objstr_t *store, unsigned int size) if (store->next == NULL) return NULL; store = store->next; + store->next = NULL; store->size = DEFAULT_OBJ_STORE_SIZE; } store->top = (void *)((unsigned int)store + sizeof(objstr_t) + size);