L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
list_alloc.h File Reference

Simple list-based allocator. More...

#include <l4/sys/l4int.h>
#include <l4/sys/compiler.h>
+ Include dependency graph for list_alloc.h:

Go to the source code of this file.

Functions

void l4la_free (l4la_free_t **first, void *block, l4_size_t size)
 Add free memory to memory pool.
 
void * l4la_alloc (l4la_free_t **first, l4_size_t size, unsigned align)
 Allocate memory from pool.
 
void l4la_dump (l4la_free_t **first)
 Show all list members.
 
void l4la_init (l4la_free_t **first)
 Init memory pool.
 
l4_size_t l4la_avail (l4la_free_t **first)
 Show available memory in pool.
 

Detailed Description

Simple list-based allocator.

Taken from the Fiasco kernel.

Date
Alexander Warg <aw11os.inf.tu-dresden.de> Frank Mehnert fm3@o.nosp@m.s.in.nosp@m.f.tu-.nosp@m.dres.nosp@m.den.d.nosp@m.e

Definition in file list_alloc.h.

Function Documentation

◆ l4la_alloc()

void * l4la_alloc ( l4la_free_t **  first,
l4_size_t  size,
unsigned  align 
)

Allocate memory from pool.

Parameters
firstlist identifier
sizelength of memory block to allocate
alignalignment

◆ l4la_avail()

l4_size_t l4la_avail ( l4la_free_t **  first)

Show available memory in pool.

Parameters
firstlist identifier

◆ l4la_dump()

void l4la_dump ( l4la_free_t **  first)

Show all list members.

Parameters
firstlist identifier

◆ l4la_free()

void l4la_free ( l4la_free_t **  first,
void *  block,
l4_size_t  size 
)

Add free memory to memory pool.

Parameters
firstlist identifier
blockaddress of unused memory block
sizesize of memory block

◆ l4la_init()

void l4la_init ( l4la_free_t **  first)

Init memory pool.

Parameters
firstlist identifier