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 (C) 2014 - 2020 Intel Corporation. All rights reserved. 🫢


🌈 SEE ALSO 🌈

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