bits_per(9)
π NAME π
Okay so this is the bits_per(9) page from the Kernel API Manual, and its whole job is to calculate the number of bits required for the argument. Thatβs the name, thatβs the vibe. β¨
π SYNOPSIS π
bits_per (n );
πΈ ARGUMENTS πΈ
nβ the parameter. Thatβs it. Thatβs the argument, bestie. π«Ά
π¦ DESCRIPTION π¦
This one is constant-capable, no cap β it can be used for compile-time initializations, e.g bitfields. π₯
The first few values calculated by this routine are:
bf(0) = 1bf(1) = 1bf(2) = 2bf(3) = 2bf(4) = 3- ... and so on.
π SEE ALSO π
Kernel file ./include/linux/log2.h is right here, plus the whole icon squad:
is_power_of_2(9)__roundup_pow_of_two(9)__rounddown_pow_of_two(9)const_ilog2(9)ilog2(9)roundup_pow_of_two(9)rounddown_pow_of_two(9)order_base_2(9)max_pow_of_two_factor(9)
π Cute little sign-off: source/version is ./include/linux, the date is October 2026, and the page is bits_per(9). Stay slay, bestie. π
π¦ 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