kmalloc_obj(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

okay so bestie, this is kmalloc_obj(9) from the Kernel API Manual β€” and its whole thing is allocating a single instance of the given type. one (1) little guy. iconic. no cap. πŸ’…

πŸŽ€ SYNOPSIS πŸŽ€

kmalloc_obj (VAR_OR_TYPE , ... );

🫢 ARGUMENTS 🫢

  • VAR_OR_TYPE β€” the variable or type you're allocating. that's the main character of this call. ✨
  • ... β€” optional GFP flags for the allocation. if you don't pass any, it's GFP_KERNEL, periodt. 🌸

πŸ’– RETURN πŸ’–

on success you get a newly allocated pointer to a VAR_OR_TYPE β€” slay. on failure you get NULL. 😭

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file: ./include/linux/slab.h β€” and the whole friend group is:


that's the whole vibe, bestie β€” source/version: ./include/linux, dated October 2026. mwah πŸ’‹

πŸ“¦ where this page comes from