gfp_t(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, welcome to gfp_t(9) from the Kernel API Manual β€” this is the page about memory allocation flags, and it's lowkey iconic for doing so much with one little typedef. βœ¨πŸ’…

🌸 NAME 🌸

typedef gfp_t β€” memory allocation flags, periodt. πŸŽ€

✨ DESCRIPTION ✨

GFP flags are commonly used throughout Linux to indicate how memory should be allocated. That's the whole vibe: they're the little signals that tell the kernel what kind of memory situation it's in. 🧚✨

The GFP acronym stands for get_free_pages, which is the underlying memory allocation function. No cap, that's literally what it means. πŸ’–

Not every GFP flag is supported by every function which may allocate memory β€” so yeah, bestie, don't just assume every flag works everywhere. πŸ™ˆ

Most users will want to use a plain GFP_KERNEL β€” that's the main character move for most people. πŸ‘‘πŸ’…

πŸ’– SEE ALSO πŸ’–

  • Kernel file ./tools/include/linux/gfp_types.h πŸ—‚οΈ
  • Page mobility and placement hints(9)
  • Watermark modifiers(9)
  • Reclaim modifiers(9)
  • Action modifiers(9)
  • Useful GFP flag combinations(9)

byeee 🫢 β€” source/version: ./tools/include/linux ✨ date: October 2026 πŸŽ€ β€” manual: gfp_t(9) πŸ’œ

πŸ“¦ where this page comes from