#include "dstm.h"
+extern objstr_t *prefetchcache;
-objstr_t *objstrCreate(unsigned int size)
-{
- objstr_t *tmp = calloc(1, (sizeof(objstr_t) + size));
- tmp->size = size;
- tmp->next = NULL;
- tmp->top = tmp + 1; //points to end of objstr_t structure!
- return tmp;
+objstr_t *objstrCreate(unsigned int size) {
+ objstr_t *tmp = calloc(1, (sizeof(objstr_t) + size));
+ tmp->size = size;
+ tmp->next = NULL;
+ tmp->top = tmp + 1; //points to end of objstr_t structure!
+ return tmp;
}
//free entire list, starting at store
}
}
+void clearObjStore() {
+ objstr_t *tmp = prefetchcache;
+ while(tmp != NULL) {
+ bzero(tmp+1, tmp->size);
+ tmp = tmp->next;
+ }
+}