ucx/mempool.c

changeset 116
234920008754
parent 113
8693d7874773
child 131
fc3af16818a3
equal deleted inserted replaced
115:965fd17ed9cf 116:234920008754
110 if(pool->data[i] == mem) { 110 if(pool->data[i] == mem) {
111 pool->data[i] = newm; 111 pool->data[i] = newm;
112 return newm + sizeof(ucx_destructor); 112 return newm + sizeof(ucx_destructor);
113 } 113 }
114 } 114 }
115 fprintf(stderr, "FATAL: 0x%08"PRIxPTR" not in mpool 0x%08" PRIxPTR"\n", 115 fprintf(stderr, "FATAL: 0x%08" PRIxPTR" not in mpool 0x%08" PRIxPTR"\n",
116 (intptr_t)ptr, (intptr_t)pool); 116 (intptr_t)ptr, (intptr_t)pool);
117 exit(1); 117 exit(1);
118 } else { 118 } else {
119 return newm + sizeof(ucx_destructor); 119 return newm + sizeof(ucx_destructor);
120 } 120 }
134 } 134 }
135 pool->ndata--; 135 pool->ndata--;
136 return; 136 return;
137 } 137 }
138 } 138 }
139 fprintf(stderr, "FATAL: 0x%08"PRIxPTR" not in mpool 0x%08" PRIxPTR"\n", 139 fprintf(stderr, "FATAL: 0x%08" PRIxPTR" not in mpool 0x%08" PRIxPTR"\n",
140 (intptr_t)ptr, (intptr_t)pool); 140 (intptr_t)ptr, (intptr_t)pool);
141 exit(1); 141 exit(1);
142 } 142 }
143 143
144 void ucx_mempool_destroy(UcxMempool *pool) { 144 void ucx_mempool_destroy(UcxMempool *pool) {

mercurial