bitmap_allocate_region(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 of unsigned 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 fr
  • order β€” region size (log base 2 of number of bits) to allocate. yes bestie it's a log base 2 situation, so order is 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 🫢


🌈 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