bitmap_allocate_region(9)
π bitmap_allocate_region(9) π
okay so bestie, welcome to the Kernel API Manual page for bitmap_allocate_region β yes that's the function name, yes it's a whole mood, and yes we're gonna get through this together π«Ά
β¨ NAME β¨
bitmap_allocate_region β allocate bitmap region, literally what it says on the tin π
π¦ SYNOPSIS π¦
int bitmap_allocate_region (unsigned long *bitmap , unsigned int pos ,
int order );
likeβ¦ look at her. iconic signature. no notes π
πΈ ARGUMENTS πΈ
bitmapβ array ofunsigned longs corresponding to the bitmap. this is the actual canvas, the vibe holder, the bit-home πposβ beginning of bit region to allocate. where the story starts, fr frorderβ region size (log base 2 of number of bits) to allocate. yes bestie it's a log base 2 situation, soorderis not the bit count, it's the exponent π don't get got by that one
π DESCRIPTION π
Allocate (set bits in) a specified region of a bitmap.
that's it. that's the whole thing. you pick a region, it gets set. slay β¨
π RETURN π
0 on success, or -EBUSY if specified region wasn't free (not all bits were zero).
heads up bestie: if even one bit in that region isn't zero, it's a -EBUSY and you get nothing. no partial vibe, no half-allocated mess β the region has to be fully free or it's a no π
π SEE ALSO π
the whole friend group, no cap π«Ά
- Kernel file
./include/linux/bitmap.h bitmap overview(9)bitmap bitops(9)declare bitmap(9)bitmap_find_next_zero_area(9)bitmap_or_equal(9)bitmap_weight_from(9)bitmap_scatter(9)bitmap_gather(9)bitmap_release_region(9)bitmap_find_free_region(9)BITMAP_FROM_U64(9)bitmap_from_u64(9)bitmap_read(9)bitmap_write(9)
π SIGN-OFF π
k bye bestie, go allocate responsibly π§ this cutie lives over in ./include/linux, dated October 2026, and yes the page is literally called bitmap_allocate_region(9) β remember her name πβ
π¦ 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