zs_lookup_class_index(9)
π zs_lookup_class_index(9) π
okay so this is a page from the Kernel API Manual, section 9, bestie β and it's about zs_lookup_class_index. yes it's a mouthful, no we're not renaming it, it's iconic as is π
β¨ NAME β¨
zs_lookup_class_index β returns the index of the zsmalloc size_class that holds objects of the provided size π
πΈ SYNOPSIS πΈ
unsigned int zs_lookup_class_index (struct zs_pool *pool , unsigned int size );
π¦ ARGUMENTS π¦
poolβ the zsmalloc pool you wanna use, like the lil container it all lives in π«Άsizeβ the object size, aka how big the thing is
π CONTEXT π
Any context. literally any. no vibe restrictions here β¨
β RETURN β
It gives you back the index of the zsmalloc size_class that holds objects of the provided size. that's the whole flex π
π SEE ALSO π
Kernel file ./mm/zsmalloc.c, plus these besties:
ngl, if you're poking around zsmalloc internals, go read the source too β the manpage is the trailer, ./mm/zsmalloc.c is the whole movie π
and that's the page!! brought to you by the ./mm directory, dated October 2026, posted under zs_lookup_class_index(9) β mwah, go slay ur kernel work 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