find_next_clump8(9)
β¨ 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 goesaddrβ the address to base the search on π your starting point, your main character addresssizeβ bitmap size in number of bits π yes, in bits, not bytes, don't come for meoffsetβ 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:
find_next_bit(9)find_next_and_bit(9)find_next_andnot_bit(9)find_next_or_bit(9)find_next_zero_bit(9)find_first_bit(9)find_nth_bit(9)find_nth_and_bit(9)find_nth_and_andnot_bit(9)find_first_and_bit(9)find_first_andnot_bit(9)find_first_and_and_bit(9)find_first_zero_bit(9)find_last_bit(9)find_next_and_bit_wrap(9)find_next_bit_wrap(9)for_each_set_bitrange(9)for_each_set_bitrange_from(9)for_each_clear_bitrange(9)for_each_clear_bitrange_from(9)for_each_set_bit_wrap(9)for_each_set_clump8(9)
like, that's the whole friend group right there π§ the bit-finding fam. go say hi.
fr fr: the found clump value lands inclump, the bit offset is what you get back, andsizeis 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms