/*** Wrapper to thread-specific allocator for freeing memory */ void txFree(void* ptr) { if ((*my_ts)&1) { frees.insert(ptr); } else { free(ptr); } }
/*** Wrapper to thread-specific allocator for allocating memory */ void* txAlloc(size_t const &size) { void* ptr = malloc(size); if ((*my_ts)&1) { allocs.insert(ptr); } return ptr; }
/*** Wrapper to thread-specific allocator for freeing memory */ void txFree(void* ptr) { sitefree(ptr); return; if ((*my_ts)&1) frees.insert(ptr); else sitefree(ptr); }
/*** Wrapper to thread-specific allocator for allocating memory */ void* txAlloc(size_t const &size) { void* ptr = sitemalloc(size); return ptr; // printf("-----------------------------------------------txAlloc %p meta %lx\n", ptr, *(((uint64_t*)ptr)-1)); if ((*my_ts)&1) allocs.insert(ptr); return ptr; }