L4Re - L4 Runtime Environment
kumem_alloc.h File Reference

Kumem allocator utility C interface. More...

#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.


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. More...

Detailed Description

Kumem allocator utility C interface.

Definition in file kumem_alloc.h.

Function Documentation

◆ l4re_util_kumem_alloc()

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.

[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
The amount of kernel-user memory that can be allocated at once is limited by the used kernel implementation. The minmum allocatable amount is one page. A portable implementation should not depend on allocations greater than 16KiB to succeed.