MEMKIND_HUGETLB(3)
π MEMKIND_HUGETLB π
okay bestie, welcome to memkind_hugetlb β it's a manpage, it's from section 3 of the manual, and it's giving hugetlb memory memkind operations. Let's get into it β¨
πΈ NAME πΈ
memkind_hugetlb β hugetlb memory memkind operations. ππΎ
β οΈ Note: This is EXPERIMENTAL API. The functionality and the header file itself can be changed (including non-backward compatible changes) or removed. so likeβ¦ don't get too attached, fr fr π
π SYNOPSIS π
int memkind_hugetlb_check_available_2mb(struct memkind *kind);
int memkind_hugetlb_get_mmap_flags(struct memkind *kind, int *flags);
void memkind_hugetlb_init_once(void);
look at those three little icons, they're everything π
π¦ DESCRIPTION π¦
The hugetlb memory memkind operations enable memory kinds which use the Linux hugetlbfs file system. if you wanna know more about hugetlbfs, the link is right here, no gatekeeping:
https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt
memkind_hugetlb_check_available_2mb() checks if there are 2MB pages reserved in the default hugetlbfs. here's the lil plot twist tho β if the kind implements ops.get_mbind_nodemask(), then only the NUMA nodes set by the nodemask are checked. otherwise? every single NUMA node gets checked. all of them. the whole roster. π
memkind_hugetlb_get_mmap_flags() sets the flags for the mmap() system call such that the hugetlbfs is utilized for allocations. it's literally just doing the flag-setting so your allocations know where to live π
memkind_hugetlb_init_once() this function initializes the MEMKIND_HUGETLB kind, and it should not be called more than once. it's giving "one and done", main character energy, no encores π«π
π Note: memkind_hugetlb_init_once() may reserve some extra memory. just so you know. it's not free, bestie.
π COPYRIGHT π
Copyright (C) 2014 - 2020 Intel Corporation. All rights reserved. π«Ά
π SEE ALSO π
memkind(3)memkind_arena(3)memkind_default(3)memkind_hbw(3)memkind_pmem(3)jemalloc(3)mbind(2)mmap(2)
go read those too, they're lowkey iconic β¨π
and that's the whole page, bestie!! this one came from Intel Corporation, dated 2015-04-21, and it lives in the manual as MEMKIND_HUGETLB(3). slay, stay hydrated, and remember: experimental API means it will change on you ππ π¦
π¦ where this page comes from
- centos-stream 9: memkind-devel 1.11.0-2.el9 Β· BSD
- debian bookworm: libmemkind-dev 1.14.0-2 Β· BSD-3-Clause
- fedora 43: memkind-devel 1.14.0-11.fc43 Β· BSD-2-Clause
- ubuntu jammy: libmemkind-dev 1.13.0-1 Β· BSD-3-Clause
- ubuntu noble: libmemkind-dev 1.14.0-3build1 Β· BSD-3-Clause
- π the page's license: BSD-2-Clause
- Copyright (C) 2014 - 2020 Intel Corporation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms