zs_lookup_class_index(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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