Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

hugetlbfs_unlinked_fd_for_size(3) [centos man page]

HUGETLBFS_UNLINKED_FD(3)				     Library Functions Manual					  HUGETLBFS_UNLINKED_FD(3)

NAME
hugetlbfs_unlinked_fd, hugetlbfs_unlinked_fd_for_size - Obtain a file descriptor for a new unlinked file in hugetlbfs SYNOPSIS
#include <hugetlbfs.h> int hugetlbfs_unlinked_fd(void); int hugetlbfs_unlinked_fd_for_size(long page_size); DESCRIPTION
These functions return an open file descriptor for a unique, newly-created file in a hugetlbfs filesystem. To avoid leaking hugepages, the file is unlinked automatically before the function returns. For hugetlbfs_unlinked_fd, the default huge page size is used (see gethugepagesize(3)). For hugetlbfs_unlinked_fd_for_size, a valid huge page size must be specified (see gethugepagesizes(3)). RETURN VALUE
On success, a valid open file descriptor is returned. On failure, -1 is returned and errno may be set appropriately. SEE ALSO
gethugepagesize(3), gethugepagesizes(3), mkstemp(3), libhugetlbfs(7) AUTHORS
libhugetlbfs was written by various people on the libhugetlbfs-devel mailing list. March 7, 2012 HUGETLBFS_UNLINKED_FD(3)

Check Out this Related Man Page

GETPAGESIZES(3) 					     Library Functions Manual						   GETPAGESIZES(3)

NAME
getpagesizes - Get the system supported huge page sizes SYNOPSIS
#include <hugetlbfs.h> int getpagesizes(long pagesizes[], int n_elem); DESCRIPTION
The getpagesizes() function returns either the number of system supported page sizes or the sizes themselves. If pagesizes is NULL and n_elem is 0, then the number of pages the system supports is returned. Otherwise, pagesizes is filled with at most n_elem page sizes. RETURN VALUE
On success, either the number of page sizes supported by the system or the number of page sizes stored in pagesizes is returned. On fail- ure, -1 is returned and errno is set appropriately. ERRORS
EINVAL n_elem is less than zero or n_elem is greater than zero and pagesizes is NULL. Also see opendir(3) for other possible values for errno. This error occurs when the sysfs directory exists but cannot be opened. NOTES
This call will return all page sizes as reported by the kernel. Not all of these sizes may be usable by the programmer since mount points may not be available for the huge page sizes. To test whether a size will be usable by libhugetlbfs, hugetlbfs_find_path_for_size() can be called on a specific size to see if a mount point is configured. SEE ALSO
oprofile(1), opendir(3), gethugepagesizes(3), libhugetlbfs(7) AUTHORS
libhugetlbfs was written by various people on the libhugetlbfs-devel mailing list. October 10, 2008 GETPAGESIZES(3)
Man Page