Linux Memory Management: Slabs

Memory slabs are used by Linux kernel to manage memory for kernel objects. The objects are e.g dentry, inodes, and buffer heads

Why to Know About Slabs

  • If you don’t understand about missing usage info of cached memory objects.
  • The system is low on memory and top & free are not enough.

Design of Slab Allocator

The slab allocator maintains slabs as a circular queue. The queue is expanded and shrunk (nodes merged).

How to Access Slab Info

  • /proc/slabinfo
  • A command slabtop also shows slab info.

Reference