bitmap_find_next_zero_area(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

hii bestie πŸ’– welcome to the bitmap_find_next_zero_area(9) page from the Kernel API Manual β€” we're finding a contiguous aligned zero area together, and honestly? iconic behavior ✨

okay so the NAME is literally bitmap_find_next_zero_area β€” find a contiguous aligned zero area 🫢


✨ SYNOPSIS ✨

unsigned long bitmap_find_next_zero_area (unsigned long *map , unsigned long size , unsigned long start , unsigned int nr , unsigned long align_mask );

that's the whole signature, no cap πŸ’…


πŸ’… ARGUMENTS πŸ’…

  • map β€” the address to base the search on πŸ—ΊοΈ like, this is home base for the search, okay?
  • size β€” the bitmap size in bits πŸ“ that's how much bitmap we're working with.
  • start β€” the bitnumber to start searching at πŸ‘€ your starting point, bestie.
  • nr β€” the number of zeroed bits we're looking for πŸ” we want this many zero bits, periodt.
  • align_mask β€” alignment mask for zero area 🎯 this one's got alignment opinions, iykyk.

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so the tea is: align_mask should be one less than a power of 2 🧚 the effect is that the bit offset of all zero areas this function finds is multiples of that power of 2. and an align_mask of 0 means no alignment is required β€” she's flexible, slay πŸ’…βœ¨


🌸 RETURN 🌸

you get the bit offset of the found area, or a value >= size if no area is found 😭 so if it's greater than or equal to size, that's the "no area found" vibe. no cap.


πŸ’– SEE ALSO πŸ’–

Kernel file ./include/linux/bitmap.h is right here, plus the whole bestie lineup β€” and yes, every single reference is included, I would never gatekeep 🫢


mwah πŸ’‹ this cutie came from ./include/linux, dated October 2026 β€” source/version and date mentioned, cute sign-off complete, periodt βœ¨πŸŽ€

πŸ“¦ where this page comes from