ran valgrind...found a few issues...
authorbdemsky <bdemsky>
Thu, 6 Dec 2007 23:08:53 +0000 (23:08 +0000)
committerbdemsky <bdemsky>
Thu, 6 Dec 2007 23:08:53 +0000 (23:08 +0000)
Robust/src/Runtime/DSTM/interface/ISSUESTOADDRESS
Robust/src/Runtime/DSTM/interface/objstr.c

index e6e4ce9fe78957a198991d0e3218b6039c1590b0..d90400327788e917c33dfa07387c55b3166278d3 100644 (file)
@@ -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...
index 08b3c5712ebf07e2e123be0717d6fec836f12b05..906573385c6cd78ff0062e47211f8c8ed30d81fd 100644 (file)
@@ -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);