Loading...
Searching...
No Matches
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.

## Functions

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

Parameters

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

References L4_CV.

## l4la_avail()

l4_size_t l4la_avail | ( | l4la_free_t ** | first | ) |

Show available memory in pool.

Parameters

  first | list identifier

References L4_CV, and L4_END_DECLS.

## l4la_dump()

void l4la_dump | ( | l4la_free_t ** | first | ) |

Show all list members.

Parameters

  first | list identifier

References L4_CV.

## l4la_free()

L4_BEGIN_DECLS 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

References L4_CV.

## l4la_init()

void l4la_init | ( | l4la_free_t ** | first | ) |

Init memory pool.

Parameters

  first | list identifier

References L4_CV.