L4Re Operating System Framework
Interface and Usage Documentation
•All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 * License: see LICENSE.spdx (in this directory or the directories above)
13 */
14
15#ifndef L4UTIL_L4LA_H
16#define L4UTIL_L4LA_H
17
18#include <l4/sys/l4int.h>
19#include <l4/sys/compiler.h>
20
21typedef struct l4la_free_t_s
22{
23 struct l4la_free_t_s *next;
24 l4_size_t size;
25} l4la_free_t;
26
27#define L4LA_INITIALIZER { 0 }
28
30
35L4_CV void l4la_free(l4la_free_t **first, void *block, l4_size_t size);
36
41L4_CV void* l4la_alloc(l4la_free_t **first, l4_size_t size, unsigned align);
42
45L4_CV void l4la_dump(l4la_free_t **first);
46
49L4_CV void l4la_init(l4la_free_t **first);
50
53L4_CV l4_size_t l4la_avail(l4la_free_t **first);
54
56
57#endif
L4 compiler related defines.
unsigned int l4_size_t
Unsigned size type.
Definition l4int.h:24
#define __END_DECLS
End section with C types and functions.
Definition compiler.h:167
#define L4_CV
Define calling convention.
Definition linkage.h:33
#define __BEGIN_DECLS
Start section with C types and functions.
Definition compiler.h:164
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.