44 typedef struct { |
44 typedef struct { |
45 ucx_destructor destructor; |
45 ucx_destructor destructor; |
46 void *ptr; |
46 void *ptr; |
47 } ucx_regdestr; |
47 } ucx_regdestr; |
48 |
48 |
49 void ucx_mempool_shared_destr(void* ptr) { |
49 UCX_EXTERN void ucx_mempool_shared_destr(void* ptr) { |
50 ucx_regdestr *rd = (ucx_regdestr*)ptr; |
50 ucx_regdestr *rd = (ucx_regdestr*)ptr; |
51 rd->destructor(rd->ptr); |
51 rd->destructor(rd->ptr); |
52 } |
52 } |
53 |
53 |
54 UcxMempool *ucx_mempool_new(size_t n) { |
54 UcxMempool *ucx_mempool_new(size_t n) { |