IC4_BUFFER_POOL_CONFIG Struct Reference
Configures the behavior of a IC4_BUFFER_POOL. More...
Data Fields
size_t | cache_frames_max Maximum number of frames to keep in the buffer pool's cache. |
size_t | cache_bytes_max Maximum size of the buffer pool cache in bytes, or |
struct IC4_ALLOCATOR_CALLBACKS | allocator A structure containing function pointers to customize the buffer pool's allocator. |
void * | allocator_context A user-defined value that is passed to the allocator callbacks. |
Detailed Description
Configures the behavior of a IC4_BUFFER_POOL.
Field Documentation
◆ allocator
struct IC4_ALLOCATOR_CALLBACKS allocator |
A structure containing function pointers to customize the buffer pool's allocator.
This parameter is optional, set all callback functions to NULL
to use the default allocator.
If IC4_ALLOCATOR_CALLBACKS::allocate_buffer is set, IC4_ALLOCATOR_CALLBACKS::free_buffer must be set as well.
◆ allocator_context
void* allocator_context |
A user-defined value that is passed to the allocator callbacks.
If callback_context
points to a memory location, and callback functions access that memory, the program has to make sure that the memory is valid until the IC4_ALLOCATOR_CALLBACKS::release callback is executed.