Slab Allocation - Slabs - Small Slabs

Small Slabs

The small slabs contain objects that are less than 1/8 of the page size for a given machine. These small slabs need to be optimized further from the logical layout, by avoiding using bufctls (which would be just as large as the data itself and cause memory usage to be much greater). A small slab is exactly one page, and has a defined structure that allows bufctls to be avoided. The last part of the page contains the 'slab header', which is the information needed to retain the slab. Starting at the first address of that page, there are as many buffers as can be allocated without running into the slab header at the end of the page.

Instead of using bufctls, we use the buffers themselves to retain the free list links. This allows the small slab's bufctl to be bypassed.

Read more about this topic:  Slab Allocation, Slabs

Famous quotes containing the word small:

    Nothing would give up life;
    Even the dirt kept breathing a small breath.
    Theodore Roethke (1908–1963)