![]() |
L4Re Operating System Framework
Interface and Usage Documentation
|
Slab allocator for object of type Type. More...
#include <slab_alloc>
Public Member Functions | |
| Type * | alloc () noexcept |
| Allocate an object of type Type. | |
| void | free (Type *o) noexcept |
| Free the object addressed by o. | |
| Public Member Functions inherited from cxx::Base_slab< sizeof(Type), L4_PAGESIZE, 2, New_allocator > | |
| void * | alloc () noexcept |
| Allocate a new object. | |
| void | free (void *_o) noexcept |
| Free the given object (_o). | |
| unsigned | total_objects () const noexcept |
| Get the total number of objects managed by the slab allocator. | |
| unsigned | free_objects () const noexcept |
| Get the number of objects which can be allocated before a new empty slab needs to be added to the slab allocator. | |
Additional Inherited Members | |
| Public Types inherited from cxx::Base_slab< sizeof(Type), L4_PAGESIZE, 2, New_allocator > | |
| 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 335 of file slab_alloc.
|
inlinenoexcept |
Allocate an object of type Type.
Definition at line 355 of file slab_alloc.
References cxx::Base_slab< sizeof(Type), Slab_size, Max_free, Alloc >::alloc().
|
inlinenoexcept |
Free the object addressed by o.
| o | The pointer to the object to free. |
Definition at line 366 of file slab_alloc.
References free().
Referenced by free().