mas_nomem_nofail(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🍁 mas_nomem_nofail(9) β€” the Kernel API Manual moment πŸ’…

okay so bestie, welcome to the mas_nomem_nofail(9) page β€” yes that's the whole title, and yes we're gonna get through it together 🫢 this is a kernel API manual entry and it's lowkey iconic, so grab a lil snack and let's go ✨


🌸 NAME 🌸

mas_nomem_nofail β€” retries allocations with __GFP_NOFAIL, but ONLY if the maple state has stored the -ENOMEM error. that's the whole vibe: no stored -ENOMEM, no retry. periodt πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

bool mas_nomem_nofail (struct ma_state *mas , unsigned long index ,
unsigned long last );

look at her. three args, returns a bool, main character energy fr fr πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • mas β€” the maple state, obviously. she's the star of the show πŸ’–
  • index β€” the start of the range for the mas reset 🌈
  • last β€” the end of the range for the mas reset ⭐

✨ RETURN ✨

so here's the tea β˜•:

  • returns false if mas isn't in an -ENOMEM state πŸ™ˆ
  • returns true if the allocation actually happens β€” and when it does, the state is reset πŸŽ‰
⚠️ important bestie, don't skip this: the internal lock will be dropped, and external locks must allow blocking. like, literally must. no cap. if your locks can't block, this is not the function for you πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

kernel file ./lib/maple_tree.c β€” and the whole friend group πŸ’œ:


and that's the page!! 🧚 this lil gem lives in ./lib and the manual dates it to October 2026, and obviously it's filed under mas_nomem_nofail(9) β€” slay, bye bestie, go retry those allocations responsibly πŸ’–πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from