memkind_hugetlb (3) - Linux Manuals

memkind_hugetlb: hugetlb memory memkind operations.


memkind_hugetlb.h - hugetlb memory memkind operations.
Note: This is EXEPRIMENTAL API. The functionality and the header file itself can be changed (including non-backward compatible changes), or remove.


#include <memkind/internal/memkind_hugetlb.h>

Link with -lmemkind

int memkind_hugetlb_check_available_2mb(struct memkind *kind);

int memkind_hugetlb_check_available_1gb(struct memkind *kind);
int memkind_hugetlb_get_mmap_flags(struct memkind *kind, int *flags);
void memkind_hugetlb_init_once(void);


The hugetlb memory memkind operations enable memory kinds which use the Linux hugetlbfs file system. For more information about the hugetlbfs see link below.

memkind_hugetlb_check_available_2mb() Check if there are 2MB pages reserved in the default hugetlbfs. If the kind implements ops.get_mbind_nodemask(), then only the NUMA nodes set by the nodemask are checked, otherwise every NUMA node is checked.

memkind_hugetlb_check_available_1gb() Similar to memkind_hugetlb_check_available_2mb() except that the check is for 1GB pages instead of 2MB pages.

memkind_hugetlb_get_mmap_flags() Sets the flags for the mmap() system call such that the hugetlbfs is utilized for allocations.

memkind_hugetlb_init_once() This function initializes MEMKIND_HUGETLB kind and it should not be called more than once. Note: memkind_hugetlb_init_once() may reserve some extra memory.


Copyright (C) 2014 - 2016 Intel Corporation. All rights reserved.