diff options
author | 2024-01-26 14:15:54 +0000 | |
---|---|---|
committer | 2024-02-13 16:17:02 +0000 | |
commit | 77ce67f70b4e274721cb7ac348410546f5d5dabd (patch) | |
tree | ba987be5d79de68f3990895d8f959bd5bc0f9bbd /src/vppinfra/pmalloc.c | |
parent | cb3372ddc87ef35a74da4dabc2046f760e386b05 (diff) |
vppinfra: MAP_HUGETLB isn't available on FreeBSD
Don't use the MAP_HUGETLB mmap flag on FreeBSD as it isn't available on
the platform.
Type: improvement
Change-Id: Ie2046601c693f9ef12cf8113d6dbd87c322f1cf0
Signed-off-by: Tom Jones <thj@freebsd.org>
Diffstat (limited to 'src/vppinfra/pmalloc.c')
-rw-r--r-- | src/vppinfra/pmalloc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vppinfra/pmalloc.c b/src/vppinfra/pmalloc.c index 0bd343494e9..9fb8ac4dcfe 100644 --- a/src/vppinfra/pmalloc.c +++ b/src/vppinfra/pmalloc.c @@ -273,8 +273,10 @@ pmalloc_map_pages (clib_pmalloc_main_t * pm, clib_pmalloc_arena_t * a, } else { +#ifdef __linux__ if (a->log2_subpage_sz != clib_mem_get_log2_page_size ()) mmap_flags |= MAP_HUGETLB; +#endif /* __linux__ */ mmap_flags |= MAP_PRIVATE | MAP_ANONYMOUS; a->fd = -1; |