L4Re – L4 Runtime Environment
|
Merged slab allocator (allocators for objects of the same size are merged together). More...
Public Member Functions | |
Type * | alloc () throw () |
Allocate an object of type Type . More... | |
![]() | |
void * | alloc () throw () |
Allocate an object. More... | |
void | free (void *p) throw () |
Free the given object (p ). More... | |
unsigned | total_objects () const throw () |
Get the total number of objects managed by the slab allocator. More... | |
unsigned | free_objects () const throw () |
Get the number of free objects in the slab allocator. More... | |
Additional Inherited Members |
Merged slab allocator (allocators for objects of the same size are merged together).
Type | The type of the objects to manage. |
Slab_size | The size of a slab. |
Max_free | The maximum number of free slabs. |
Alloc | The allocator for the slabs. |
This slab allocator class is useful for merging slab allocators with the same parameters (equal sizeof(Type)
, Slab_size
, Max_free
, and Alloc
parameters) together and share the overhead for the slab caches among all equal-sized objects.
Definition at line 476 of file slab_alloc.
|
inline |
Allocate an object of type Type
.
Definition at line 489 of file slab_alloc.