Debian Codegraph @

man/hugetlbfs_unlinked_fd.3

raw
1 .\" Hey, EMACS: -*- nroff -*-
2 .\" Copyright 2012 Cray Inc.
3 .\" All rights reserved.
4 .\" Licensed under LGPL 2.1 by Cray Inc.
5 .\"
6 .\" First parameter, NAME, should be all caps
7 .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
8 .\" other parameters are allowed: see man(7), man(1)
9 .TH HUGETLBFS_UNLINKED_FD 3 "March 7, 2012"
10 .\" Please adjust this date whenever revising the manpage.
11 .\"
12 .\" Some roff macros, for reference:
13 .\" .nh disable hyphenation
14 .\" .hy enable hyphenation
15 .\" .ad l left justify
16 .\" .ad b justify to both left and right margins
17 .\" .nf disable filling
18 .\" .fi enable filling
19 .\" .br insert line break
20 .\" .sp <n> insert n+1 empty lines
21 .\" for manpage-specific macros, see man(7)
22 .SH NAME
23 hugetlbfs_unlinked_fd, hugetlbfs_unlinked_fd_for_size - Obtain a file descriptor for a new unlinked file in hugetlbfs
24 .SH SYNOPSIS
25 .B #include <hugetlbfs.h>
26
27 .br
28 .B int hugetlbfs_unlinked_fd(void);
29 .br
30 .B int hugetlbfs_unlinked_fd_for_size(long page_size);
31
32 .SH DESCRIPTION
33
34 These functions return an open file descriptor for a unique, newly-created
35 file in a hugetlbfs filesystem. To avoid leaking hugepages, the file
36 is unlinked automatically before the function returns.
37
38 For hugetlbfs_unlinked_fd, the default huge page size is used (see
39 gethugepagesize(3)). For hugetlbfs_unlinked_fd_for_size, a valid huge
40 page size must be specified (see gethugepagesizes(3)).
41
42 .SH RETURN VALUE
43
44 On success, a valid open file descriptor is returned. On failure,
45 -1 is returned and errno may be set appropriately.
46
47 .SH SEE ALSO
48 .I gethugepagesize(3),
49 .I gethugepagesizes(3),
50 .I mkstemp(3),
51 .I libhugetlbfs(7)
52
53 .SH AUTHORS
54 libhugetlbfs was written by various people on the libhugetlbfs-devel
55 mailing list.