bitmap_find_next_zero_area(9)
π 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 π«Ά
bitmap overview(9)bitmap bitops(9)declare bitmap(9)bitmap_or_equal(9)bitmap_weight_from(9)bitmap_scatter(9)bitmap_gather(9)bitmap_release_region(9)bitmap_allocate_region(9)bitmap_find_free_region(9)BITMAP_FROM_U64(9)bitmap_from_u64(9)bitmap_read(9)bitmap_write(9)
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
- 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