Main Page   File List  

list_alloc.h File Reference

Simple list-based allocator. More...

Go to the source code of this file.

Data Structures

struct  l4la_free_t_s

Defines

#define L4LA_INITIALIZER   { 0 }

Typedefs

typedef struct l4la_free_t_s l4la_free_t

Functions

L4_CV void l4la_free (l4la_free_t **first, void *block, l4_size_t size)
 Add free memory to memory pool.
L4_CV void * l4la_alloc (l4la_free_t **first, l4_size_t size, unsigned align)
 Allocate memory from pool.
L4_CV void l4la_dump (l4la_free_t **first)
 Show all list members.
L4_CV void l4la_init (l4la_free_t **first)
 Init memory pool.
L4_CV 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@os.inf.tu-dresden.de>

Definition in file list_alloc.h.


Function Documentation

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

Add free memory to memory pool.

Parameters:
first list identifier
block address of unused memory block
size size of memory block

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

Allocate memory from pool.

Parameters:
first list identifier
size length of memory block to allocate
align alignment

L4_CV void l4la_dump ( l4la_free_t **  first  ) 

Show all list members.

Parameters:
first list identifier

L4_CV void l4la_init ( l4la_free_t **  first  ) 

Init memory pool.

Parameters:
first list identifier

L4_CV l4_size_t l4la_avail ( l4la_free_t **  first  ) 

Show available memory in pool.

Parameters:
first list identifier


L4 Utilities, part of DROPS  © 2000-2003