src/dpdk/drivers/net/mlx4/mlx4_utils.c
size_t
mlx4_mallocv(const char *type, const struct mlx4_malloc_vec *vec,
	     unsigned int cnt)
{
	return mlx4_mallocv_inline(type, vec, cnt, 0, SOCKET_ID_ANY);
}
/**
 * Allocate memory once for several disparate objects.
 *
 * This function adds iovec-like semantics (e.g. readv()) to rte_malloc().
 * Memory is allocated once for several contiguous objects of nonuniform
 * sizes and alignment constraints.
 *
 * Each entry of @p vec describes the size, alignment constraint and
 * provides a buffer address where the resulting object pointer must be
 * stored.
 *
 * The buffer of the first entry is guaranteed to point to the beginning of
 * the allocated region and is safe to use with rte_free().
 *
 * NULL buffers are silently ignored.
 *
 * Providing a NULL buffer in the first entry prevents this function from
 * allocating any memory but has otherwise no effect on its behavior. In
 * this case, the contents of remaining non-NULL buffers are updated with
 * addresses relative to zero (i.e. offsets that would have been used during
 * the allocation).
 *
 * @param[in] type
 *   A string identifying the type of allocated objects (useful for debug
 *   purposes, such as identifying the cause of a memory leak). Can be NULL.
 * @param[in, out] vec
 *   Description of objects to allocate memory for.
 * @param cnt
 *   Number of entries in @p vec.
 *
 * @return
 *   Size in bytes of the allocated region including any padding. In case of
 *   error, rte_errno is set, 0 is returned and NULL is stored in the
 *   non-NULL buffers pointed by @p vec.
 *
 * @see struct mlx4_malloc_vec
 * @see rte_malloc()
 */
Allocate memory once for several disparate objects.
This function adds iovec-like semantics ) to rte_malloc().
Memory is allocated once for several contiguous objects of nonuniform
sizes and alignment constraints.

Each entry of @p vec describes the size, alignment constraint and
provides a buffer address where the resulting object pointer must be
stored.

The buffer of the first entry is guaranteed to point to the beginning of
the allocated region and is safe to use with rte_free().

NULL buffers are silently ignored.

Providing a NULL buffer in the first entry prevents this function from
allocating any memory but has otherwise no effect on its behavior. In
this case, the contents of remaining non-NULL buffers are updated with
addresses relative to zero .

@param[in] type
A string identifying the type of allocated objects (useful for debug
purposes, such as identifying the cause of a memory leak). Can be NULL.
@param[in, out] vec
Description of objects to allocate memory for.
@param cnt
Number of entries in @p vec.

@return
Size in bytes of the allocated region including any padding. In case of
error, rte_errno is set, 0 is returned and NULL is stored in the
non-NULL buffers pointed by @p vec.


Allocate memory once for several disparate objects . This function adds iovec - like semantics ) to rte_malloc () . Memory is allocated once for several contiguous objects of nonuniform sizes and alignment constraints . Each entry of @p vec describes the size alignment constraint and provides a buffer address where the resulting object pointer must be stored . The buffer of the first entry is guaranteed to point to the beginning of the allocated region and is safe to use with rte_free () . NULL buffers are silently ignored . Providing a NULL buffer in the first entry prevents this function from allocating any memory but has otherwise no effect on its behavior . In this case the contents of remaining non - NULL buffers are updated with addresses relative to zero . @param [ in ] type A string identifying the type of allocated objects ( useful for debug purposes such as identifying the cause of a memory leak ) . Can be NULL . @param [ in out ] vec Description of objects to allocate memory for . @param cnt Number of entries in @p vec . @return Size in bytes of the allocated region including any padding . In case of error rte_errno is set 0 is returned and NULL is stored in the non - NULL buffers pointed by @p vec .
size_t
mlx4_mallocv(const char *type, const struct mlx4_malloc_vec *vec,
	     unsigned int cnt)
{
	return mlx4_mallocv_inline(type, vec, cnt, 0, SOCKET_ID_ANY);
}
size_t mlx4_mallocv ( const char * type , const struct mlx4_malloc_vec * vec , unsigned int cnt ) { return mlx4_mallocv_inline ( type , vec , cnt , 0 , SOCKET_ID_ANY ) ; }
Allocate memory once for several disparate objects.
Allocate memory once for several disparate objects .