if (!mdp)
return NULL;
- LOCK(mdp);
- void *ret = mmalloc(mdp, n);
- UNLOCK(mdp);
- return ret;
+ return mmalloc(mdp, n);
}
void *calloc(size_t nmemb, size_t size)
if (!mdp)
return NULL;
- LOCK(mdp);
void *ret = mmalloc(mdp, nmemb*size);
- UNLOCK(mdp);
// This was already done in the callee:
if(!(mdp->options & XBT_MHEAP_OPTION_MEMSET)) {
memset(ret, 0, nmemb * size);
if (!mdp)
return NULL;
- LOCK(mdp);
- void* ret = mrealloc(mdp, p, s);
- UNLOCK(mdp);
- return ret;
+ return mrealloc(mdp, p, s);
}
void free(void *p)
return;
xbt_mheap_t mdp = GET_HEAP();
- LOCK(mdp);
mfree(mdp, p);
- UNLOCK(mdp);
}