[][src]Function mmal_sys::mmal_vc_consume_mem

pub unsafe extern "C" fn mmal_vc_consume_mem(
    size: usize,
    handle: *mut u32
) -> Type

Consumes memory in the relocatable heap.

The existing reserved memory is freed first then the new chunk is allocated. If zero is specified for the size then the previously reserved memory is freed and no allocation occurs.

At startup no memory is reserved.

@param size Size of memory to consume in bytes. @param handle Set to the mem handle for the reserved memory or zero if no memory was allocated. @return MMAL_SUCCESS if memory was reserved (or size zero requested), MMAL_ENOSPC if the allocation failed or MMAL_ENOSYS if the API is not supported e.g in release mode VC images. @internal