29 #ifndef UCX_ALLOCATOR_H |
29 #ifndef UCX_ALLOCATOR_H |
30 #define UCX_ALLOCATOR_H |
30 #define UCX_ALLOCATOR_H |
31 |
31 |
32 #include <stdlib.h> |
32 #include <stdlib.h> |
33 |
33 |
|
34 #ifdef __cplusplus |
|
35 extern "C" { |
|
36 #endif |
|
37 |
34 typedef struct { |
38 typedef struct { |
35 void *(*malloc)(void *data, size_t n); |
39 void *(*malloc)(void *data, size_t n); |
36 void *(*realloc)(void *data, void *mem, size_t n); |
40 void *(*realloc)(void *data, void *mem, size_t n); |
37 void *(*calloc)(void *data, size_t nelem, size_t n); |
41 void *(*calloc)(void *data, size_t nelem, size_t n); |
38 void(*free)(void *data, void *mem); |
42 void(*free)(void *data, void *mem); |