1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2014 Intel Corporation
5 #ifndef EAL_HUGEPAGES_H
6 #define EAL_HUGEPAGES_H
12 #define MAX_HUGEPAGE_PATH PATH_MAX
15 * Structure used to store informations about hugepages that we mapped
16 * through the files in hugetlbfs.
18 struct hugepage_file {
19 void *orig_va; /**< virtual addr of first mmap() */
20 void *final_va; /**< virtual addr of 2nd mmap() */
21 uint64_t physaddr; /**< physical addr */
22 size_t size; /**< the page size */
23 int socket_id; /**< NUMA socket ID */
24 int file_id; /**< the '%d' in HUGEFILE_FMT */
25 int memseg_id; /**< the memory segment to which page belongs */
26 char filepath[MAX_HUGEPAGE_PATH]; /**< path to backing file on filesystem */
30 * Read the information from linux on what hugepages are available
33 int eal_hugepage_info_init(void);
35 #endif /* EAL_HUGEPAGES_H */