pcpu_chunk_addr_search(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 pcpu_chunk_addr_search β€” like, the manual page πŸ’…

okay so bestie, this one is from the Kernel API Manual (yes, that's the manual name, we're being fancy today ✨). Let me walk you through it, no cap.


✨ NAME ✨

pcpu_chunk_addr_search β€” figure out which chunk a given address lives in πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

struct pcpu_chunk * pcpu_chunk_addr_search (void *addr );

πŸ’– ARGUMENTS πŸ’–

  • addr β€” the address we're tryna find the chunk for, literally. Give it the address, it finds the chunk. That's the whole vibe. 🫢

🌸 DESCRIPTION 🌸

So this is an internal function, bestie β€” it's not out here doing main character public-API things. It handles all but static allocations, periodt. πŸ’…

And listen, the important caveat: static percpu address values should never be passed into the allocator. Like, ever. Don't do it. That's the rule. πŸ™ˆ


⭐ RETURN ⭐

It returns the address of the found chunk. That's it, that's the whole return value. Iconic and simple. πŸ‘‘


πŸ”₯ SEE ALSO πŸ”₯

The kernel file is ./mm/percpu.c β€” and here's the whole friend group, all of them, no one left out:


okay that's the whole page 🧚 this little cutie comes from the ./mm source tree, dated October 2026, and it's filed under pcpu_chunk_addr_search(9) β€” slay, go read the source bestie πŸ’œπŸ’–

πŸ“¦ where this page comes from