L4Re – L4 Runtime Environment
|
Slab allocator for object of type Type
.
More...
Public Member Functions | |
Type * | alloc () throw () |
Allocate an object of type Type . More... | |
void | free (Type *o) throw () |
Free the object addressed by o . More... | |
![]() | |
void * | alloc () throw () |
Allocate a new object. More... | |
void | free (void *_o) throw () |
Free the given object (_o ). 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 objects which can be allocated before a new empty slab needs to be added to the slab allocator. More... | |
Additional Inherited Members | |
![]() | |
typedef New_allocator< Slab_i > | Slab_alloc |
Type of the backend allocator. | |
Slab allocator for object of type Type
.
Type | The type of the objects to manage. |
Slab_size | Size of a slab. |
Max_free | The maximum number of free slabs. |
Alloc | The allocator for the slabs. |
Definition at line 346 of file slab_alloc.
|
inline |
Allocate an object of type Type
.
Definition at line 366 of file slab_alloc.
References cxx::Base_slab< Obj_size, Slab_size, Max_free, Alloc >::alloc().
|
inline |
Free the object addressed by o
.
o | The pointer to the object to free. |
Definition at line 377 of file slab_alloc.