L4Re - L4 Runtime Environment
|
Standard list-based allocator. More...
Public Member Functions | |
List_alloc () | |
Initializes an empty list allocator. More... | |
void | free (void *block, unsigned long size, bool initial_free=false) |
Return a free memory block to the allocator. More... | |
void * | alloc (unsigned long size, unsigned align) |
Alloc a memory block. More... | |
void * | alloc_max (unsigned long min, unsigned long *max, unsigned align, unsigned granularity) |
Allocate a memory block of min <= size <=max . More... | |
unsigned long | avail () |
Get the amount of available memory. More... | |
Standard list-based allocator.
Definition at line 31 of file list_alloc.
|
inline |
Initializes an empty list allocator.
Definition at line 56 of file list_alloc.
References alloc(), alloc_max(), avail(), L4::cerr, free(), cxx::max(), and cxx::min().
|
inline |
Alloc a memory block.
size | Size of the memory block |
align | Alignment constraint |
Definition at line 354 of file list_alloc.
Referenced by List_alloc().
|
inline |
Allocate a memory block of min
<= size <=max
.
min | Minimal size to allocate. | |
[in,out] | max | Maximum size to allocate. The actual allocated size is returned here. |
align | Alignment constraint. | |
granularity | Granularity to use for the allocation. |
Definition at line 257 of file list_alloc.
References l4_round_size(), l4_trunc_size(), and cxx::max().
Referenced by List_alloc().
|
inline |
Get the amount of available memory.
Definition at line 425 of file list_alloc.
Referenced by List_alloc().
|
inline |
Return a free memory block to the allocator.
block | pointer to memory block |
size | size of memory block |
initial_free | Set to true for putting fresh memory to the allocator. This will enforce alignment on that memory. |
Definition at line 218 of file list_alloc.
Referenced by List_alloc().