[][src]Function mmal_sys::mmal_pool_create

pub unsafe extern "C" fn mmal_pool_create(
    headers: c_uint,
    payload_size: u32
) -> *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 payload buffers may also be allocated independently by the client, and assigned to the buffer headers, but it will be the responsibility of the client to deal with resizing and releasing the memory. It is recommended that mmal_pool_create_with_allocator() is used in this case, supplying allocator function pointers that will be used as necessary by MMAL.

@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. @return Pointer to the newly created pool or NULL on failure.