sbitmap_get_shallow(9)
β¨ sbitmap_get_shallow(9) β¨
okay bestie, we're in the Kernel API Manual and this one is lowkey specific but fr fr useful π
πΈ NAME πΈ
sbitmap_get_shallow β try to allocate a free bit from a &struct sbitmap, limiting the depth used from each word. π
π¦ SYNOPSIS π¦
int sbitmap_get_shallow (struct sbitmap *sb , unsigned long
shallow_depth );
π ARGUMENTS π
sbβ the bitmap to allocate from, bestie. π«Άshallow_depthβ the maximum number of bits to allocate from the bitmap. β¨
π DESCRIPTION π
So this is a rather specific operation, and it's giving "multiple users, different allocation limits" energy π. E.g., there can be a high-priority class that uses sbitmap_get and a low-priority class that uses sbitmap_get_shallow with a shallow_depth of (sb->depth >> 1). Then, the low-priority class can only allocate half of the total bits in the bitmap, preventing it from starving out the high-priority class. no cap, that's the whole point π§
β RETURN β
Non-negative allocated bit number if successful, -1 otherwise. periodt. π
π SEE ALSO π
Kernel file ./lib/sbitmap.c π
xoxo, sending you off with the ./lib source/version vibe, October 2026, and all the sbitmap_get_shallow(9) energy ππβ¨
π¦ 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