L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
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
23typedef 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
37L4_CV void l4la_free(l4la_free_t **first, void *block, l4_size_t size);
38
43L4_CV void* l4la_alloc(l4la_free_t **first, l4_size_t size, unsigned align);
44
47L4_CV void l4la_dump(l4la_free_t **first);
48
51L4_CV void l4la_init(l4la_free_t **first);
52
55L4_CV l4_size_t l4la_avail(l4la_free_t **first);
56
58
59#endif
L4 compiler related defines.
unsigned int l4_size_t
Unsigned size type.
Definition l4int.h:35
#define L4_CV
Define calling convention.
Definition linkage.h:44
#define EXTERN_C_BEGIN
Start section with C types and functions.
Definition compiler.h:192
#define EXTERN_C_END
End section with C types and functions.
Definition compiler.h:193
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.
void l4la_init(l4la_free_t **first)
Init memory pool.
void * l4la_alloc(l4la_free_t **first, l4_size_t size, unsigned align)
Allocate memory from pool.
l4_size_t l4la_avail(l4la_free_t **first)
Show available memory in pool.