---
name: "hugetlbfs_find_path_for_size"
section: "3"
platform: "linux"
package: "libhugetlbfs-dev"
version: "2.24-1+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/hugetlbfs_find_path"
---

# hugetlbfs\_find\_path\_for\_size(3)

Locate an appropriate hugetlbfs mount point

Part of [hugetlbfs\_find\_path(3)](/hugetlbfs_find_path/3.md).

## NAME

hugetlbfs\_find\_path, hugetlbfs\_find\_path\_for\_size - Locate an appropriate hugetlbfs mount point

## SYNOPSIS

**#include \<hugetlbfs.h\>**

const char \*hugetlbfs\_find\_path(void);\
 const char \*hugetlbfs\_find\_path\_for\_size(long page\_size);

## DESCRIPTION

These functions return a pathname for a mounted hugetlbfs filesystem for the appropriate huge page size.  For hugetlbfs\_find\_path, the default huge page size is used (see [gethugepagesize(3)](/gethugepagesize/3.md)).  For hugetlbfs\_find\_path\_for\_size, a valid huge page size must be specified (see [gethugepagesizes(3)](/gethugepagesizes/3.md)).

## RETURN VALUE

On success, a non-NULL value is returned. On failure, NULL is returned.

## SEE ALSO

*[libhugetlbfs(7)](/libhugetlbfs/7.md),* *[gethugepagesize(3)](/gethugepagesize/3.md),* *[gethugepagesizes(3)](/gethugepagesizes/3.md)*

## AUTHORS

libhugetlbfs was written by various people on the libhugetlbfs-devel mailing list.
