|
L4Re - L4 Runtime Environment
|
Basic slab allocator. More...
Inheritance diagram for cxx::Base_slab< Obj_size, Slab_size, Max_free, Alloc >:
Collaboration diagram for cxx::Base_slab< Obj_size, Slab_size, Max_free, Alloc >:Public Types | |
| enum | { object_size = Obj_size, slab_size = Slab_size, objects_per_slab = (Slab_size - sizeof(Slab_head)) / object_size, max_free_slabs = Max_free } |
| typedef Alloc< Slab_i > | Slab_alloc |
| Type of the allocator for the slab caches. | |
Public Member Functions | |
| unsigned | total_objects () const throw () |
| Get the total number of objects managed by the slab allocator. More... | |
| unsigned | free_objects () const throw () |
| Get the total number of objects managed by the slab allocator. More... | |
Basic slab allocator.
| Obj_size | The size of the objects managed by the allocator (in bytes). |
| Slab_size | The size of a slab cache (in bytes). |
| Max_free | The maximum number of free slab caches. When this limit is reached slab caches are freed. |
| Alloc | The allocator that is used to allocate the slab caches. |
Definition at line 40 of file slab_alloc.
| anonymous enum |
| Enumerator | |
|---|---|
| object_size | size of an object. |
| slab_size | size of a slab cache. |
| objects_per_slab | objects per slab cache. |
| max_free_slabs | maximum number of free slab caches. |
Definition at line 63 of file slab_alloc.
|
inline | |||||||||||||
Get the total number of objects managed by the slab allocator.
Definition at line 271 of file slab_alloc.
Referenced by cxx::Base_slab_static< sizeof(Type), Slab_size, Max_free, Alloc >::free_objects().
Here is the caller graph for this function:
|
inline | |||||||||||||
Get the total number of objects managed by the slab allocator.
Definition at line 263 of file slab_alloc.
Referenced by cxx::Base_slab_static< sizeof(Type), Slab_size, Max_free, Alloc >::total_objects().
Here is the caller graph for this function: