summaryrefslogtreecommitdiffstats
path: root/src/vppinfra/test_pmalloc.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-10-24 17:08:26 +0200
committerMarco Varlese <marco.varlese@suse.de>2018-10-25 10:52:42 +0000
commit567e61d09cd00174203eff85f63a598420476951 (patch)
tree528e0fb979a25f990a552cbb3c4b14d491cff678 /src/vppinfra/test_pmalloc.c
parent3935fc8527c340535a00108b78f3de064df50a7f (diff)
pmalloc: support for 4K pages
Change-Id: Iecceffe06a92660976ebb58cd3cbec4be8931db0 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vppinfra/test_pmalloc.c')
-rw-r--r--src/vppinfra/test_pmalloc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vppinfra/test_pmalloc.c b/src/vppinfra/test_pmalloc.c
index c9ae01fc936..90b1775bb4f 100644
--- a/src/vppinfra/test_pmalloc.c
+++ b/src/vppinfra/test_pmalloc.c
@@ -29,6 +29,7 @@ typedef struct
u32 arena_pages;
u32 arena_numa;
u32 arena_items;
+ u32 arena_log2_pg_sz;
int verbose;
clib_pmalloc_main_t pmalloc_main;
} test_main_t;
@@ -73,6 +74,7 @@ test_palloc (test_main_t * tm)
fformat (stdout, "Allocate %d items from arena ...\n", tm->arena_items);
arena = clib_pmalloc_create_shared_arena (pm, "test arena",
tm->arena_pages << 21,
+ tm->arena_log2_pg_sz,
tm->arena_numa);
if (arena == 0)
clib_error ("Failed to alloc shared arena: %U", format_clib_error,
@@ -125,6 +127,8 @@ test_palloc_main (unformat_input_t * i)
;
else if (unformat (i, "arena-items %u", &tm->arena_items))
;
+ else if (unformat (i, "arena-log2-page-size %u", &tm->arena_log2_pg_sz))
+ ;
else if (unformat (i, "verbose"))
tm->verbose = 1;
else