sbitmap_resize(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ sbitmap_resize ✨

okay so real talk, this is a page from the kernel API manual, and it's about sbitmap_resize β€” the function that resizes a &struct sbitmap. that's it, that's the vibe πŸ’…


🌸 SYNOPSIS 🌸

void sbitmap_resize (struct sbitmap *sb , unsigned int depth );

literally two things go in, nothing comes out. we love a void king πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • sb β€” the bitmap you're resizing. hand it over bestie 🫢
  • depth β€” the new number of bits you wanna resize to. the new headcount, if you will ✨

πŸ’– DESCRIPTION πŸ’–

okay so the big thing here: this does not reallocate anything. not a single byte. it's giving "I'm just changing the number, don't ask me to move furniture" 😭

and because of that, it's on the caller β€” that's you, bestie β€” to make sure the new depth doesn't exceed the depth that the sb was initialized with. no cap, that's your job, not the function's. it will not check for you. do your vibe check before you call it πŸ™ˆ

⚠️ lowkey important: since nothing gets reallocated, a depth bigger than what sb was initialized with is your problem. read that sentence twice. πŸ’€

πŸ”₯ SEE ALSO πŸ”₯

kernel file ./include/linux/sbitmap.h πŸ¦‹ and all these iconic siblings:


and that's the whole page, periodt πŸ’…βœ¨

this lil masterpiece lives in ./include/linux and it was stamped with the date October 2026 β€” so yeah, mark your calendar, bestie, that's the whole sign-off πŸŽ€πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from