113 if (newcap < pool->size || ucx_mempool_chcap(pool, newcap)) { |
113 if (newcap < pool->size || ucx_mempool_chcap(pool, newcap)) { |
114 return NULL; |
114 return NULL; |
115 } |
115 } |
116 } |
116 } |
117 |
117 |
118 ucx_memchunk *mem = (ucx_memchunk*)malloc(sizeof(ucx_destructor) + n); |
118 void *p = malloc(sizeof(ucx_destructor) + n); |
|
119 ucx_memchunk *mem = (ucx_memchunk*)p; |
119 if (!mem) { |
120 if (!mem) { |
120 return NULL; |
121 return NULL; |
121 } |
122 } |
122 |
123 |
123 mem->destructor = NULL; |
124 mem->destructor = NULL; |