zs_malloc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– zs_malloc(9) πŸ’–

okay bestie, welcome to the Kernel API Manual entry for zs_malloc β€” yes, we're literally allocating a block of a given size from a pool, and it's giving kernel-core main character energy πŸ’…βœ¨


🌸 NAME 🌸

zs_malloc β€” allocate a block of the given size from a pool. that's the whole vibe 🫢


✨ SYNOPSIS ✨

unsigned long zs_malloc (struct zs_pool *pool , size_t size , gfp_t gfp
, const int nid );

πŸŽ€ ARGUMENTS πŸŽ€

  • pool β€” the pool you're allocating from, bestie. that's the source πŸŠβ€β™€οΈ
  • size β€” the size of the block to allocate. yes, size matters πŸ’…
  • gfp β€” the gfp flags used when allocating the object 🌱
  • nid β€” the preferred node id for allocating a new zspage (if needed). key phrase: if needed πŸ‘€

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea: on success, zs_malloc returns a handle to the allocated object. slay. πŸŽ‰

otherwise? you get an ERR_PTR. not the cute kind of surprise 😭

⚠️ heads up: allocation requests with size > ZS_MAX_ALLOC_SIZE will fail. no cap, that's the limit. πŸ’€

🌈 SEE ALSO 🌈


and that's the page, bestie πŸ’– source/version: ./mm β€” dated October 2026 πŸŽ€βœ¨ go forth and allocate responsibly, mwah πŸ«ΆπŸ‘‘

πŸ“¦ where this page comes from