L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
kumem_alloc.h File Reference

Kumem allocator utility C interface. More...

#include <l4/sys/compiler.h>
#include <l4/sys/types.h>
#include <l4/sys/linkage.h>
Include dependency graph for kumem_alloc.h:

Go to the source code of this file.

Functions

L4_BEGIN_DECLS int l4re_util_kumem_alloc (l4_addr_t *mem, unsigned pages_order, l4_cap_idx_t task, l4_cap_idx_t rm) L4_NOTHROW
 Allocate state area.

Detailed Description

Kumem allocator utility C interface.

Definition in file kumem_alloc.h.

Function Documentation

◆ l4re_util_kumem_alloc()

L4_BEGIN_DECLS int l4re_util_kumem_alloc ( l4_addr_t * mem,
unsigned pages_order,
l4_cap_idx_t task,
l4_cap_idx_t rm )

Allocate state area.

Parameters
[out]memPointer to memory that has been allocated.
pages_orderSize to allocate, in log2 pages.
taskTask to use for allocation.
rmRegion manager to use for allocation.
Return values
0for success
<0error code on failure
Note
The amount of kernel-user memory that can be allocated at once is limited by the used kernel implementation. The minimum allocatable amount is one page. A portable implementation should not depend on allocations greater than 16KiB to succeed.
Examples
examples/sys/aliens/main.c, and examples/sys/utcb-ipc/main.c.

References L4_END_DECLS, and L4_NOTHROW.