15 #ifndef RCL__ALLOCATOR_H_ 16 #define RCL__ALLOCATOR_H_ 44 void * (*allocate)(
size_t size,
void *
state);
59 void * (*reallocate)(
void * pointer,
size_t size,
void *
state);
101 #endif // RCL__ALLOCATOR_H_
rcl_allocator_t rcl_get_default_allocator(void)
Return a properly initialized rcl_allocator_t with default values.
void * state
Implementation defined state storage.
Definition: allocator.h:62
#define RCL_WARN_UNUSED
Ignored return values of functions with this macro will emit a warning.
Definition: macros.h:25
#define RCL_PUBLIC
Definition: visibility_control.h:48
void(* deallocate)(void *pointer, void *state)
Deallocate previously allocated memory, mimicking std::free().
Definition: allocator.h:47
Encapsulation of an allocator.
Definition: allocator.h:40
void * rcl_reallocf(void *pointer, size_t size, rcl_allocator_t *allocator)
Emulate the behavior of reallocf.
struct rcl_allocator_t rcl_allocator_t
Encapsulation of an allocator.