[−][src]Function mmal_sys::mmal_pool_create_with_allocator
pub unsafe extern "C" fn mmal_pool_create_with_allocator(
headers: c_uint,
payload_size: u32,
allocator_context: *mut c_void,
allocator_alloc: mmal_pool_allocator_alloc_t,
allocator_free: mmal_pool_allocator_free_t
) -> *mut MMAL_POOL_T
Create a pool of MMAL_BUFFER_HEADER_T. After allocation, all allocated buffer headers will have been added to the queue.
It is valid to create a pool with no buffer headers, or with zero size payload buffers. The mmal_pool_resize() function can be used to increase or decrease the number of buffer headers, or the size of the payload buffers, after creation of the pool. The allocators passed during creation shall be used when resizing the payload buffers.
@param headers Number of buffer headers to be allocated with the pool. @param payload_size Size of the payload buffer that will be allocated in each of the buffer headers. @param allocator_context Pointer to the context of the allocator. @param allocator_alloc Function pointer for the alloc call of the allocator. @param allocator_free Function pointer for the free call of the allocator.
@return Pointer to the newly created pool or NULL on failure.