MCPcopy Create free account
hub / github.com/F-Stack/f-stack / mlx5_os_malloc

Function mlx5_os_malloc

dpdk/drivers/common/mlx5/linux/mlx5_common_os.h:256–264  ·  view source on GitHub ↗

* Memory allocation optionally with alignment. * * @param[in] align * Alignment size (may be zero) * @param[in] size * Size in bytes to allocate * * @return * Valid pointer to allocated memory, NULL in case of failure */

Source from the content-addressed store, hash-verified

254 * Valid pointer to allocated memory, NULL in case of failure
255 */
256static inline void *
257mlx5_os_malloc(size_t align, size_t size)
258{
259 void *buf;
260
261 if (posix_memalign(&buf, align, size))
262 return NULL;
263 return buf;
264}
265
266/**
267 * This API de-allocates a memory that originally could have been

Callers 1

mlx5_alloc_alignFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected