sbitmap_resize(9)
β¨ 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, adepthbigger than whatsbwas initialized with is your problem. read that sentence twice. π
π₯ SEE ALSO π₯
kernel file ./include/linux/sbitmap.h π¦ and all these iconic siblings:
struct sbitmap_word(9)struct sbitmap(9)struct sbq_wait_state(9)struct sbitmap_queue(9)sbitmap_init_node(9)sbitmap_free(9)sbitmap_get(9)sbitmap_any_bit_set(9)__sbitmap_for_each_set(9)sbitmap_for_each_set(9)sbitmap_show(9)sbitmap_weight(9)sbitmap_bitmap_show(9)sbitmap_queue_init_node(9)sbitmap_queue_free(9)sbitmap_queue_recalculate_wake_batch(9)sbitmap_queue_resize(9)__sbitmap_queue_get(9)__sbitmap_queue_get_batch(9)sbitmap_queue_get_shallow(9)sbitmap_queue_get(9)sbitmap_queue_min_shallow_depth(9)sbitmap_queue_clear(9)sbitmap_queue_clear_batch(9)sbq_wait_ptr(9)sbitmap_queue_wake_all(9)sbitmap_queue_wake_up(9)sbitmap_queue_show(9)
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
- 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