54 ucx_destructor destructor; |
54 ucx_destructor destructor; |
55 /** A pointer to the data. */ |
55 /** A pointer to the data. */ |
56 void *ptr; |
56 void *ptr; |
57 } ucx_regdestr; |
57 } ucx_regdestr; |
58 |
58 |
59 UCX_EXTERN void ucx_mempool_shared_destr(void* ptr) { |
59 #ifdef __cplusplus |
|
60 extern "C" |
|
61 #endif |
|
62 void ucx_mempool_shared_destr(void* ptr) { |
60 ucx_regdestr *rd = (ucx_regdestr*)ptr; |
63 ucx_regdestr *rd = (ucx_regdestr*)ptr; |
61 rd->destructor(rd->ptr); |
64 rd->destructor(rd->ptr); |
62 } |
65 } |
63 |
66 |
64 UcxMempool *ucx_mempool_new(size_t n) { |
67 UcxMempool *ucx_mempool_new(size_t n) { |