Before we introduce the slab allocator, let's define some terms it uses:
- Slab: This is a contiguous piece of physical memory made of several page frames. Each slab is divided into equal chunks of the same size, used to store specific types of kernel object, such as inodes, mutexes, and so on. Each slab is then an array of objects.
- Cache: It is made of one or more slabs in a linked list, and they are represented in the kernel as instances of the struct kmem_cache_t structure. The cache only stores objects of the same type (for example, inodes only, or only address space structures).
Slabs may be in one of the following states:
- Empty: This is where all objects (chunks) on the slab are marked as free
- Partial ...