예제 #1
0
 /*** Wrapper to thread-specific allocator for freeing memory */
 void txFree(void* ptr)
 {
     if ((*my_ts)&1) {
         frees.insert(ptr);
     } else {
         free(ptr);
     }
 }
예제 #2
0
 /*** 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;
 }
예제 #3
0
      /*** 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);
      }
예제 #4
0
      /*** 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;
      }