static inline int del(hdr_t* hdr) { if (hdr->tag != ALLOCATION_TAG) { return -1; } ScopedPthreadMutexLocker locker(&lock); del_locked(hdr, &tail, &head); --gAllocatedBlockCount; return 0; }
static inline int del_and_check_locked(hdr_t* hdr, hdr_t** tail, hdr_t** head, unsigned* cnt, int* safe) { int valid = check_allocation_locked(hdr, safe); if (safe) { (*cnt)--; del_locked(hdr, tail, head); } return valid; }
static inline int del(struct hdr *hdr) { if (hdr->tag != ALLOCATION_TAG) return -1; pthread_mutex_lock(&lock); del_locked(hdr, &tail, &head); num--; pthread_mutex_unlock(&lock); return 0; }