memweight(9)
π
memweight(9) β like, the Kernel API Manual page for memweight
okay so bestie, welcome to memweight(9) β a whole kernel API manual page for one tiny little function, and honestly? she's iconic. no cap. πΈ
β¨ NAME β¨
memweight β count the total number of bits set in a memory area
like, you point her at a chunk of memory and she just... counts every single bit that's set to 1. that's the whole job. main character energy fr fr. π
π SYNOPSIS π
size_t memweight (const void *ptr , size_t bytes );
that's her. that's the whole signature. and yes, she returns a size_t, because what else would she return. π
π¦ ARGUMENTS π¦
ptrβ pointer to the start of the area. like, where the memory actually begins. hand her the address and she's off. π«Άbytesβ the size of the area. how much of it we're looking at. she needs to know the range, okay? girl can't read minds. β¨
π SEE ALSO π
- Kernel file
./lib/memweight.cβ go read her source, she's literally right there, iykyk π
π§ quick vibe check:ptris the start,bytesis the size, and the return value is the count of bits set in that area. that's the whole story, bestie β no hidden lore, no drama, no footnotes. periodt. π
π and that's the page!! π this little gem lives in ./lib, and it was the October 2026 situation, so like... bear that in mind when you're quoting her. mwah, slay, go count some bits. π₯πβ
π¦ 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