malloc: make alignment requirements more stringent
authorAnatoly Burakov <anatoly.burakov@intel.com>
Fri, 14 Dec 2018 11:54:01 +0000 (11:54 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 20 Dec 2018 14:34:03 +0000 (15:34 +0100)
commit646e5260ee5371709042b0e2712822ba3ea63fe3
tree177119ce891f0e5a8df0dea88eac1094eb9f0dc9
parentb3e735e16e07de79fb09dfb485eae2965c952d74
malloc: make alignment requirements more stringent

The external heaps API already implicitly expects start address
of the external memory area to be page-aligned, but it is not
enforced or documented. Fix this by implementing additional
parameter checks at memory add call, and document the page
alignment requirement explicitly.

Fixes: 7d75c31014f7 ("malloc: allow adding memory to named heaps")
Cc: stable@dpdk.org
Suggested-by: Yongseok Koh <yskoh@mellanox.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
lib/librte_eal/common/include/rte_malloc.h
lib/librte_eal/common/rte_malloc.c