1HUGETLBFS_UNLINKED_FD(3) Library Functions Manual HUGETLBFS_UNLINKED_FD(3)
2
3
4
6 hugetlbfs_unlinked_fd, hugetlbfs_unlinked_fd_for_size - Obtain a file
7 descriptor for a new unlinked file in hugetlbfs
8
10 #include <hugetlbfs.h>
11
12 int hugetlbfs_unlinked_fd(void);
13 int hugetlbfs_unlinked_fd_for_size(long page_size);
14
15
17 These functions return an open file descriptor for a unique, newly-cre‐
18 ated file in a hugetlbfs filesystem. To avoid leaking hugepages, the
19 file is unlinked automatically before the function returns.
20
21 For hugetlbfs_unlinked_fd, the default huge page size is used (see
22 gethugepagesize(3)). For hugetlbfs_unlinked_fd_for_size, a valid huge
23 page size must be specified (see gethugepagesizes(3)).
24
25
27 On success, a valid open file descriptor is returned. On failure, -1
28 is returned and errno may be set appropriately.
29
30
32 gethugepagesize(3), gethugepagesizes(3), mkstemp(3), libhugetlbfs(7)
33
34
36 libhugetlbfs was written by various people on the libhugetlbfs-devel
37 mailing list.
38
39
40
41 March 7, 2012 HUGETLBFS_UNLINKED_FD(3)