numam-dpdk/lib/librte_malloc
Declan Doherty 8e3e065016 mem: fix alignment parameter check
In commit 2fc8d6d the behaviour of function rte_is_power_of_2 was
changed to not return true for 0. memzone_reserve_aligned_thread_unsafe
and rte_malloc_socket both make the assumption that for align = 0
!rte_is_power_of_2(align) will return false. This patch adds a check
that align parameter is non-zero before doing the power of 2 check.

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
[Thomas: use && operator instead of ternary ?: and fix precedence with parens]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-01-19 09:36:55 +01:00
..
Makefile remove trailing whitespaces 2014-06-11 00:29:34 +02:00
malloc_elem.c add prefix to cache line macros 2014-11-27 16:21:11 +01:00
malloc_elem.h lib: fix cache alignment of structures 2014-12-11 01:42:02 +01:00
malloc_heap.c add prefix to cache line macros 2014-11-27 16:21:11 +01:00
malloc_heap.h remove trailing whitespaces 2014-06-11 00:29:34 +02:00
rte_malloc.c mem: fix alignment parameter check 2015-01-19 09:36:55 +01:00
rte_malloc.h remove trailing whitespaces 2014-06-11 00:29:34 +02:00