1GETHUGEPAGESIZES(3)        Library Functions Manual        GETHUGEPAGESIZES(3)
2
3
4

NAME

6       gethugepagesizes - Get the system supported huge page sizes
7

SYNOPSIS

9       #include <hugetlbfs.h>
10
11       int gethugepagesizes(long pagesizes[], int n_elem);
12
13

DESCRIPTION

15       The  gethugepagesizes()  function  returns  either the number of system
16       supported huge page sizes or the sizes   themselves.  If  pagesizes  is
17       NULL and n_elem is 0, then the number of huge pages the system supports
18       is returned. Otherwise, pagesizes is filled with at  most  n_elem  page
19       sizes.
20
21

RETURN VALUE

23       On  success, either the number of huge page sizes supported by the sys‐
24       tem or the number of huge page sizes stored in pagesizes  is  returned.
25       On failure, -1 is returned and errno is set appropriately.
26
27

ERRORS

29       ERRNO  n_elem  is  less  than  zero  or n_elem is greater than zero and
30              pagesizes is NULL.
31
32
33       Also see opendir(3) for other possible values  for  errno.  This  error
34       occurs when the sysfs directory exists but cannot be opened.
35
36

NOTES

38       This  call  will  return all huge page sizes as reported by the kernel.
39       Not all of these sizes may be usable  by  the  programmer  since  mount
40       points may not be available for all sizes.  To test whether a size will
41       be usable by libhugetlbfs, hugetlbfs_find_path_for_size() can be called
42       on a specific size to see if a mount point is configured.
43
44

SEE ALSO

46       oprofile(1), opendir(3), libhugetlbfs(7)
47
48

AUTHORS

50       libhugetlbfs  was  written  by various people on the libhugetlbfs-devel
51       mailing list.
52
53
54
55
56                               October 10, 2008            GETHUGEPAGESIZES(3)
Impressum