af86364409
Before this commit system call memalign was used for aligned
allocations, however memalign is deprecated.
Based on (1) - POSIX requires that memory aligned allocations can be
freed using free. Some systems provide no way to reclaim memory
allocated with memalign (because one can only pass to free a pointer
gotten from malloc, while, memalign would call malloc and then align the
obtained value).
Another issue is that 64/32 bits architectures use a minimal alignment
size. So any requested alignment below the minimal system size can be
simplified by calling malloc.
The glibc implementation allows memory obtained from posix_memalign to
be reclaimed with free. This commit replaces system call memalign with
system call posix_memalign. It also calls malloc in case the requested
alignment is below the minimal system size.
(1) https://linux.die.net/man/3/memalign
Fixes:
|
||
---|---|---|
.. | ||
linux | ||
meson.build | ||
mlx5_common_mp.c | ||
mlx5_common_mp.h | ||
mlx5_common_mr.c | ||
mlx5_common_mr.h | ||
mlx5_common_pci.c | ||
mlx5_common_pci.h | ||
mlx5_common_utils.h | ||
mlx5_common.c | ||
mlx5_common.h | ||
mlx5_devx_cmds.c | ||
mlx5_devx_cmds.h | ||
mlx5_malloc.c | ||
mlx5_malloc.h | ||
mlx5_prm.h | ||
rte_common_mlx5_version.map |