Skip to Content
Mastering Linux Kernel Development
book

Mastering Linux Kernel Development

by CH Raghav Maruthi
October 2017
Intermediate to advanced
354 pages
9h 28m
English
Packt Publishing
Content preview from Mastering Linux Kernel Development

Kmalloc caches

Slab allocator maintains a set of generic slab caches to cache memory blocks of unit sizes in multiples of 8. It maintains two sets of slab caches for each unit size, one to maintain a pool of memory blocks allocated from ZONE_NORMAL pages and another from ZONE_DMA pages. These caches are global and shared by all kernel code. Users can track the status of these caches through a special file /proc/slabinfo. Kernel services can allocate and release memory blocks from these caches through the kmalloc family of routines. They are referred to as kmalloc caches:

#cat /proc/slabinfo slabinfo - version: 2.1# name <active_objs> <num_objs> <objsize> <objperslab> <pagesperslab> : tunables <limit> <batchcount> <sharedfactor> : slabdata ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Linux Kernel Development, Third Edition

Linux Kernel Development, Third Edition

Robert Love
Understanding the Linux Kernel

Understanding the Linux Kernel

Daniel P. Bovet, Marco Cesati
Linux Kernel Debugging

Linux Kernel Debugging

Kaiwan N. Billimoria

Publisher Resources

ISBN: 9781785883057Other