L4Re - L4 Runtime Environment
list_alloc.h
Go to the documentation of this file.
1 
8 /*
9  * (c) 2003-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
10  * Frank Mehnert <fm3@os.inf.tu-dresden.de>
11  * economic rights: Technische Universit├Ąt Dresden (Germany)
12  * This file is part of TUD:OS and distributed under the terms of the
13  * GNU Lesser General Public License 2.1.
14  * Please see the COPYING-LGPL-2.1 file for details.
15  */
16 
17 #ifndef L4UTIL_L4LA_H
18 #define L4UTIL_L4LA_H
19 
20 #include <l4/sys/l4int.h>
21 #include <l4/sys/compiler.h>
22 
23 typedef struct l4la_free_t_s
24 {
25  struct l4la_free_t_s *next;
26  l4_size_t size;
27 } l4la_free_t;
28 
29 #define L4LA_INITIALIZER { 0 }
30 
32 
37 L4_CV void l4la_free(l4la_free_t **first, void *block, l4_size_t size);
38 
43 L4_CV void* l4la_alloc(l4la_free_t **first, l4_size_t size, unsigned align);
44 
47 L4_CV void l4la_dump(l4la_free_t **first);
48 
51 L4_CV void l4la_init(l4la_free_t **first);
52 
55 L4_CV l4_size_t l4la_avail(l4la_free_t **first);
56 
58 
59 #endif
unsigned int l4_size_t
Unsigned size type.
Definition: l4int.h:35
void l4la_init(l4la_free_t **first)
Init memory pool.
#define EXTERN_C_END
End section with C types and functions.
Definition: compiler.h:187
L4 compiler related defines.
void * l4la_alloc(l4la_free_t **first, l4_size_t size, unsigned align)
Allocate memory from pool.
void l4la_free(l4la_free_t **first, void *block, l4_size_t size)
Add free memory to memory pool.
void l4la_dump(l4la_free_t **first)
Show all list members.
#define EXTERN_C_BEGIN
Start section with C types and functions.
Definition: compiler.h:186
#define L4_CV
Define calling convention.
Definition: linkage.h:44
l4_size_t l4la_avail(l4la_free_t **first)
Show available memory in pool.