{
unsigned int newsize=size>DEFAULT_OBJ_STORE_SIZE?size:DEFAULT_OBJ_STORE_SIZE;
- objstr_t *os=(objstr_t *)calloc(1,(sizeof(objstr_t) + newsize));
+ objstr_t *os;
+ if((os =(objstr_t *)calloc(1,(sizeof(objstr_t) + newsize))) == NULL) {
+ printf("%s() Calloc error at line %d, %s\n", __func__, __LINE__, __FILE__);
+ return NULL;
+ }
void *ptr=&os[1];
os->next=*osptr;
(*osptr)=os;
int getResponse = 0;
#ifdef RECOVERY
-
-
#define INCREASE_EPOCH(x,y,z) ((x/y+1)*y + z)
/***********************************
* Global variables for Duplication
int numRecovery = 0;
recovery_stat_t* recoverStat;
#endif
-
-
#endif
void printhex(unsigned char *, int);
/* Send Prefetch Request */
prefetchpile_t *ptr = pilehead;
while(ptr != NULL) {
- int sd = getSock2(transPrefetchSockPool, ptr->mid);
+ int sd = getSockWithLock(transPrefetchSockPool, ptr->mid);
sendPrefetchReq(ptr, sd);
ptr = ptr->next;
}