for_each_zone(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… for_each_zone πŸ’…

Welcome to the for_each_zone(9) page from the Kernel API Manual, bestie. This one is a tiny little helper macro, and it's honestly giving β€œsmall but iconic.” 🫢


✨ NAME ✨

for_each_zone β€” helper macro to iterate over all memory zones. Periodt. πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

for_each_zone (zone );

🌸 ARGUMENTS 🌸

  • zone β€” pointer to a struct zone variable. That's the variable you're handing over, and yes, it is literally a pointer to struct zone. πŸ¦‹

🧚 DESCRIPTION 🧚

Okay so here's the whole vibe: the user only needs to declare the zone variable, and for_each_zone fills it in. That's it. That's the tea. No extra steps, no dramatic monologue. ✨

Bestie, just declare zone and let the macro do its little fill-in moment. πŸ’…

πŸ”₯ SEE ALSO πŸ”₯

Kernel file: ./include/linux/mmzone.h

Go read those too, iykyk. πŸ‘‘πŸŒˆ


Mwah πŸ’‹ this little kernel love letter comes from the source/version ./include/linux, dated October 2026, and it's your one and only for_each_zone(9) page. Slay. πŸŽ€πŸ’œ

πŸ“¦ where this page comes from