mem: allow multiple page sizes to be requested
authorCyril Chemparathy <cchemparathy@ezchip.com>
Thu, 9 Jul 2015 08:25:15 +0000 (16:25 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 13 Jul 2015 14:15:52 +0000 (16:15 +0200)
commitb3dfffd962ecd7a1d8700193b4b3305dc85e7ae4
treed618ace65891ce5f1e4fc0aff50aadd22705d460
parent2d65283c259616a5643599ce32d7a62d174ec49e
mem: allow multiple page sizes to be requested

This patch extends the memzone allocator to remove the restriction
that prevented callers from specifying multiple page sizes in the
flags argument.

In doing so, we also sanitize the free segment matching logic to get
rid of architecture specific disjunctions (2MB vs 1GB on x86, and 16MB
vs 16GB on PPC), thereby allowing for a broader range of hugepages on
architectures that support it.

Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Signed-off-by: Zhigang Lu <zlu@ezchip.com>
lib/librte_eal/common/eal_common_memzone.c