Slab allocation

In comparison with earlier mechanisms, it reduces fragmentation caused by allocations and deallocations.

[1] It is now widely used by many Unix and Unix-like operating systems including FreeBSD[2] and Linux,[3] both in the SLAB allocator and its replacement, SLUB.

[1] When the kernel creates and deletes objects often, overhead costs of initialization can result in significant performance drops.

[5] The slab allocator keeps track of these chunks, so that when it receives a request to allocate memory for a data object of a certain type, usually it can satisfy the request with a free slot (chunk) from an existing slab.

If no such location exists, the system allocates a new slab from contiguous virtual pages and assigns it to a cache.

For example, objects that are at least 1/8 of the page size for a given machine may benefit from a "large slab" size, with explicit free lists, while smaller objects may use a "small slab" setup, embed the free list tracking.