Function uct_mem_alloc

Source
pub unsafe extern "C" fn uct_mem_alloc(
    length: size_t,
    methods: *const uct_alloc_method_t,
    num_methods: c_uint,
    params: *const uct_mem_alloc_params_t,
    mem: *mut uct_allocated_memory_t,
) -> ucs_status_t
Expand description

@ingroup UCT_MD @brief Allocate memory for zero-copy communications and remote access.

Allocate potentially registered memory.

@param [in] length The minimal size to allocate. The actual size may be larger, for example because of alignment restrictions. Must be >0. @param [in] methods Array of memory allocation methods to attempt. Each of the provided allocation methods will be tried in array order, to perform the allocation, until one succeeds. Whenever the MD method is encountered, each of the provided MDs will be tried in array order, to allocate the memory, until one succeeds, or they are exhausted. In this case the next allocation method from the initial list will be attempted. @param [in] num_methods Length of ‘methods’ array. @param [in] params Memory allocation characteristics, see @ref uct_mem_alloc_params_t. @param [out] mem In case of success, filled with information about the allocated memory. @ref uct_allocated_memory_t