diff options
Diffstat (limited to 'src/vppinfra/linux/mem.c')
-rw-r--r-- | src/vppinfra/linux/mem.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vppinfra/linux/mem.c b/src/vppinfra/linux/mem.c index 8edae74f9cd..407e923fb78 100644 --- a/src/vppinfra/linux/mem.c +++ b/src/vppinfra/linux/mem.c @@ -63,6 +63,12 @@ clib_mem_get_default_hugepage_size (void) if (size) goto done; + /* + * If the kernel doesn't support hugepages, /proc/meminfo won't + * say anything about it. Use the regular page size as a default. + */ + size = clib_mem_get_page_size () / 1024; + if ((fd = open ("/proc/meminfo", 0)) == -1) return 0; |