kmem_cache_shrink(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME

kmem_cache_shrink β€” Shrink a cache.

okay so bestie, welcome to the kmem_cache_shrink(9) page from the Kernel API Manual ✨ this one is literally about shrinking a cache, and it's lowkey iconic for debugging vibes πŸ’–


🌸 SYNOPSIS

int kmem_cache_shrink (struct kmem_cache *cachep );

πŸŽ€ ARGUMENTS

  • cachep β€” the cache to shrink. yes queen, that's the cache you're pointing at πŸ’…

πŸ¦‹ DESCRIPTION

Releases as many slabs as possible for a cache.

to help debugging, a zero exit status indicates all slabs were released. that's the little debug signal, iykyk 🫢

debugging tea β˜•: if the exit status is zero, all slabs got released, periodt.

✨ RETURN

  • 0 β€” all slabs were released, slay πŸŽ‰
  • non-zero β€” not all slabs were released, so it's giving "not fully shrunk" πŸ’€

🌈 SEE ALSO


that's the whole page, bestie 🫢 source/version: ./mm Β· date: October 2026 Β· page: kmem_cache_shrink(9) β€” mwah πŸ’‹

πŸ“¦ where this page comes from