diff options
author | Damjan Marion <damarion@cisco.com> | 2020-09-17 10:40:44 +0200 |
---|---|---|
committer | Damjan Marion <damarion@cisco.com> | 2020-09-17 21:38:37 +0200 |
commit | bdbb0c5436b52b4dc6c35d05f227cdf934306d83 (patch) | |
tree | 1dd54d3763d44b3e1eabda6f592c766c31993549 /src/vppinfra/pmalloc.c | |
parent | e6b83059af3365ab12bbe93655a7dea6f691dbda (diff) |
stats: configurable page size
Type: improvement
Change-Id: I9973bce20a0a2a8a7e227cf96518de5b79374425
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vppinfra/pmalloc.c')
-rw-r--r-- | src/vppinfra/pmalloc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/vppinfra/pmalloc.c b/src/vppinfra/pmalloc.c index f6171dbf458..cb6c7e3ba3b 100644 --- a/src/vppinfra/pmalloc.c +++ b/src/vppinfra/pmalloc.c @@ -288,10 +288,7 @@ pmalloc_map_pages (clib_pmalloc_main_t * pm, clib_pmalloc_arena_t * a, if (a->flags & CLIB_PMALLOC_ARENA_F_SHARED_MEM) { mmap_flags |= MAP_SHARED; - if (a->log2_subpage_sz != clib_mem_get_log2_page_size ()) - pm->error = clib_mem_create_hugetlb_fd ((char *) a->name, &a->fd); - else - pm->error = clib_mem_create_fd ((char *) a->name, &a->fd); + a->fd = clib_mem_vm_create_fd (a->log2_subpage_sz, "%s", a->name); if (a->fd == -1) goto error; if ((ftruncate (a->fd, size)) == -1) |