find_next_clump8(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ find_next_clump8(9) ✨

okay so this is a page from the Kernel API Manual (yes, the (9) one, we're in kernel-land bestie πŸ’…) and it's literally about finding the next 8-bit clump with set bits in a memory region. it's giving "bitmap scavenger hunt" and honestly? kinda iconic.


🌸 NAME 🌸

find_next_clump8 β€” find next 8-bit clump with set bits in a memory region 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

unsigned long find_next_clump8(unsigned long *clump,
                               const unsigned long *addr,
                               unsigned long size,
                               unsigned long offset);

πŸŽ€ ARGUMENTS πŸŽ€

  • clump β€” the location to store a copy of the found clump πŸ‘‘ like, this is where the good news goes
  • addr β€” the address to base the search on πŸ” your starting point, your main character address
  • size β€” bitmap size in number of bits πŸ“ yes, in bits, not bytes, don't come for me
  • offset β€” the bit offset at which to start searching 🏁 begin here, queen

πŸ’– DESCRIPTION πŸ’–

So what does it do?? It returns the bit offset for the next set clump, and the found clump value gets copied to the location pointed to by clump ✨ two-for-one deal, no cap.

and if no bits are set? it literally returns size. that's the whole vibe. empty bitmap, nothing found, you get size back, go home πŸ’€


🌈 SEE ALSO 🌈

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

like, that's the whole friend group right there 🧚 the bit-finding fam. go say hi.


fr fr: the found clump value lands in clump, the bit offset is what you get back, and size is your "nothing to see here" answer πŸ“

and that's the page!! tysm for reading, bestie πŸ’œ this one came from ./include/linux, dated October 2026, and it's filed under find_next_clump8(9) β€” slay, periodt, go find yourself a clump 🌟

πŸ“¦ where this page comes from