__next_mem_range_rev(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __next_mem_range_rev(9) β€” a Kernel API Manual moment

okay so bestie, welcome to the Kernel API Manual page for __next_mem_range_rev β€” yes it's a mouthful, no we're not renaming it, it's iconic as-is πŸŽ€


✨ NAME ✨

__next_mem_range_rev β€” the generic next function for for_each_*_range_rev(). that's it, that's the whole vibe. she's a helper. she helps. πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

void __init_memblock __next_mem_range_rev (u64 *idx , int nid , enum
memblock_flags flags , struct memblock_type *type_a , struct
memblock_type *type_b , phys_addr_t *out_start , phys_addr_t *out_end ,
int *out_nid );

literally just look at her. seven whole parameters. main character energy, no cap πŸ‘‘


🌸 ARGUMENTS 🌸

  • idx β€” pointer to a u64 loop variable. she keeps track of where we're at, bestie πŸŒ€
  • nid β€” the node selector. pass NUMA_NO_NODE if you want all the nodes, you greedy little thing 😌
  • flags β€” how we pick blocks, based on memory attributes ✨
  • type_a β€” pointer to the memblock_type we're taking the range from (the source, the origin, the it-girl) 🫢
  • type_b β€” pointer to the memblock_type that excludes memory from being taken (the bouncer at the door πŸ’…)
  • out_start β€” ptr to a phys_addr_t for the start address of the range. can be NULL πŸ™ˆ
  • out_end β€” ptr to a phys_addr_t for the end address of the range. can be NULL too πŸ™ˆ
  • out_nid β€” ptr to an int for the nid of the range. also can be NULL. so many optional outputs, honestly slay 🌈

πŸ’œ DESCRIPTION πŸ’œ

so what does she actually do? she finds the next range from type_a that is not marked as unsuitable in type_b. that's the whole job. that's the assignment. she ate and left no crumbs πŸ”₯

and the plot twist: she's the reverse of __next_mem_range. yeah. the backwards one. the remix. ⭐


🧚 SEE ALSO 🧚

go drink some water and then go read these, i'm serious:


and that's the page!! πŸŽ€ she's from ./mm, dated October 2026, and she lives in the Kernel API Manual forever and ever. bye bestie, ily, go iterate some ranges (in reverse) πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from