Slab memory allocator with dynamic buffer resizing
AssigneeEMC IP Holding Company LLC
InventorsTony Wong, Abhinav Duggal, Hemanth Satyanarayana
Life of this patent
Estimating the term…
Abstract
Embodiments for dynamically resizing buffers for a slab allocator process are described. The slab allocator informs the consumer that the memory buffer must be shrunk to a smaller size. A buffer allocation process dynamically reclaims portions of larger memory buffers to make room for a smaller allocation by shrinking data objects in larger slabs and returning slabs to reserve or free slab lists. Initially a large limit is set, and it is dynamically reduced once all the available memory is exhausted. This allows the slab allocator to adapt to the workload.
Claims7
A computer-implemented method for dynamically allocating buffers for a slab allocator process, comprising:
- maintaining a link list of all allocated buffers grouped by buffer size;
- subdividing, by the slab allocator, a fixed size slab into a plurality of small data objects of a specific size;
- setting an upper bound for a number of data elements in a record;
- triggering, upon exceeding the upper bound, a reclaim callback mechanism to request a portion of the grouped allocated buffers back to the slab allocator;
- selecting a largest buffer from the grouped allocated buffers for space reclamation;
- and
- shrinking data objects in the largest buffer to fit a reserved slab and returning a slab of the largest buffer to a reserve slab pool and at least one other slab of the largest buffer to a free slab list.
Dependencies are inferred from the claim text.