kmemleak_alloc_percpu(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ kmemleak_alloc_percpu(9) β€” Kernel API Manual πŸ¦‹

okay so bestie, you opened the page for kmemleak_alloc_percpu(9) from the Kernel API Manual, and it's giving β€œsmall function, very important job.” no cap. πŸ’…


✨ NAME ✨

kmemleak_alloc_percpu β€” register a newly allocated __percpu object

🌸 SYNOPSIS 🌸

void __ref kmemleak_alloc_percpu (const void __percpu *ptr , size_t size
       , gfp_t gfp );

that's the whole signature, bestie. She's void, she's __ref, and she's here to register. periodt. πŸŽ€

πŸŽ€ ARGUMENTS πŸŽ€

  • ptr β€” the __percpu pointer to the beginning of the object. Like, the object's little home address. 🏑
  • size β€” the size of the object. Yes, the actual size. πŸ“
  • gfp β€” flags used for kmemleak internal memory allocations. This is the gfp situation for kmemleak's own internal memory allocations. πŸ“

πŸ’– DESCRIPTION πŸ’–

okay so this function is called from the kernel percpu allocator when a new object (a.k.a. a memory block) is allocated β€” specifically with alloc_percpu. It's the β€œnew percpu object just dropped” registration moment. ✨

🌈 SEE ALSO 🌈

the whole kmemleak crew, living in the Kernel file ./mm/kmemleak.c:


source/version: ./mm Β· date: October 2026 β€” byeee bestie, mwah πŸ’‹πŸ«Ά

πŸ“¦ where this page comes from