GETHUGEPAGESIZE(3)
π GETHUGEPAGESIZE(3) π
okay bestie, so this one is from the Library Functions Manual and it's literally just a little guy that tells you how big your huge pages are π«Ά
β¨ NAME β¨
gethugepagesize β get the default huge page size, no cap
πΈ SYNOPSIS πΈ
#include <hugetlbfs.h>
long gethugepagesize(void)
like that's it. that's the whole function. no args. she takes nothing and she gives everything π
π¦ DESCRIPTION π¦
okay so the gethugepagesize() function returns the default huge page size used by libhugetlbfs. β¨
and when she says "default", she means either:
- the system default, OR
- a valid value set by the environment variable
HUGETLB_DEFAULT_PAGE_SIZEπ
so yeah, if you set that env var to something valid, that's what you get back. she's not ignoring your vibe, she's honoring it fr fr.
β οΈ but heads up bestie β if the system does not support any huge page sizes, an error is returned. no huge pages, no answer, periodt. π
π RETURN VALUE π
- on success: the default huge page size is returned π slay
- on failure:
-1is returned anderrnois set appropriately π
π₯ ERRORS π₯
ENOSYSβ the system does not support huge pages. it's giving "sorry babe, not a thing here" π
π SEE ALSO π
libhugetlbfs(7)β go read that one too, iykyk
π AUTHORS π
libhugetlbfs was written by various people on the libhugetlbfs-devel mailing list. a whole group chat of legends, honestly. main character energy from every single one of them π
okay that's the whole page bestie, and just so you have the receipts: this version is from March 7, 2012, sourced from libhugetlbfs. go forth and page size responsibly β¨ππ¦π
π¦ where this page comes from
- debian bookworm: libhugetlbfs-dev 2.23-5 Β· LGPL-2.1-only
- debian trixie: libhugetlbfs-dev 2.24-1+b1 Β· LGPL-2.1-only
- nixpkgs unstable: libhugetlbfs 2.24
- opensuse-leap 16.0: libhugetlbfs-devel 2.24.0.g1322884-160000.3.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: libhugetlbfs-devel 2.24.0.g1322884-160000.3.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: libhugetlbfs-devel 2.24.0.g1322884-160000.3.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: libhugetlbfs-devel 2.24.0.g1322884-160000.3.2 Β· LGPL-2.1-or-later
- ubuntu jammy: libhugetlbfs-dev 2.23-4 Β· LGPL-2.1-only
- ubuntu noble: libhugetlbfs-dev 2.23-5build1 Β· LGPL-2.1-only
- ubuntu questing: libhugetlbfs-dev 2.24-1
- ubuntu resolute: libhugetlbfs-dev 2.24-1build1 Β· LGPL-2.1-only
- ubuntu stonking: libhugetlbfs-dev 2.24-1build1 Β· LGPL-2.1-only
- Copyright 2012 Cray Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms