L4Re - L4 Runtime Environment
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.


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

Detailed Description

Simple list-based allocator.

Taken from the Fiasco kernel.

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.

firstlist identifier
sizelength of memory block to allocate

◆ l4la_avail()

l4_size_t l4la_avail ( l4la_free_t **  first)

Show available memory in pool.

firstlist identifier

◆ l4la_dump()

void l4la_dump ( l4la_free_t **  first)

Show all list members.

firstlist identifier

◆ l4la_free()

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

Add free memory to memory pool.

firstlist identifier
blockaddress of unused memory block
sizesize of memory block

◆ l4la_init()

void l4la_init ( l4la_free_t **  first)

Init memory pool.

firstlist identifier