mem: make --no-huge use mmap instead of malloc
authorAnatoly Burakov <anatoly.burakov@intel.com>
Fri, 13 Jun 2014 14:52:50 +0000 (15:52 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 16 Jun 2014 13:02:10 +0000 (15:02 +0200)
commitf15addb79ebc4f192c4025aab1729bbd8fd7bc7b
tree359afbd7a80a361a05d15ebc7ef9ff94726e0361
parenta05a193109fbc6224f28098b6fefd8f3c38257f2
mem: make --no-huge use mmap instead of malloc

This makes it possible to run DPDK without hugepage memory when VFIO
is used, as VFIO uses virtual addresses to set up DMA mappings.

Technically, malloc is just fine, but we want to guarantee that
memory will be page-aligned, so using mmap to be safe.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
lib/librte_eal/linuxapp/eal/eal_memory.c