mpol_parse_str(9)
π mpol_parse_str(9) β the Kernel API Manual era π
okay so bestie, this one is from the Kernel API Manual and it's genuinely so cute β it's the function that takes a string and turns it into a mempolicy, for the tmpfs mpol mount option. iykyk π¦
β¨ NAME β¨
mpol_parse_str β parse string to mempolicy, for tmpfs mpol mount option. literally what it says on the tin, no cap π
πΈ SYNOPSIS πΈ
int mpol_parse_str (char *str , struct mempolicy **mpol );
π ARGUMENTS π
strβ string containing mempolicy to parse. it's giving "the raw text bestie, hand it over" π«Άmpolβ pointer tostruct mempolicypointer, returned on success. so it's a pointer to a pointer, yes, double pointer main character energy, and the real result gets dropped in here when it all works out π
π DESCRIPTION π
Format of input: <mode>[=<flags>][:<nodelist>]
that's it, that's the whole shape of it β¨ mode first, then optionally flags after an =, then optionally a nodelist after a :. iconic format fr fr π
β RETURN β
0 on success, else 1 π so like, zero is the good one here β classic kernel behaviour, don't let the 0 trip you up bestie π
π SEE ALSO π
- Kernel file
./mm/mempolicy.c numa_nearest_node(9)nearest_node_nodemask(9)folio_can_map_prot_numa(9)alloc_pages_mpol(9)vma_alloc_folio(9)alloc_pages(9)mpol_misplaced(9)mpol_shared_policy_init(9)mpol_to_str(9)
like a whole little friend group of mempolicy functions, obsessed actually π§π
bestie note: any changes in behaviour or details live in ./mm β go read the source if you need the deep lore, i'm just the messenger π
kisses and good luck parsing, babes π
πΈ β this page came to you from ./mm, October 2026 edition, mwah πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms