Memory allocation convenience functions.
More...
|
Functions |
L4_CV void * | l4dm_mem_allocate (l4_size_t size, l4_uint32_t flags) |
| Allocate memory.
|
L4_CV void * | l4dm_mem_allocate_named (l4_size_t size, l4_uint32_t flags, const char *name) |
| Allocate memory, name dataspace.
|
L4_CV void * | l4dm_mem_ds_allocate (l4_size_t size, l4_uint32_t flags, l4dm_dataspace_t *ds) |
| Allocate memory.
|
L4_CV void * | l4dm_mem_ds_allocate_named (l4_size_t size, l4_uint32_t flags, const char *name, l4dm_dataspace_t *ds) |
| Allocate memory, name dataspace.
|
L4_CV void * | l4dm_mem_ds_allocate_named_dsm (l4_size_t size, l4_uint32_t flags, const char *name, l4_threadid_t dsm_id, l4dm_dataspace_t *ds) |
| Allocate memory, name dataspace.
|
L4_CV void | l4dm_mem_release (const void *ptr) |
| Release memory.
|
Detailed Description
Memory allocation convenience functions.
Function Documentation
L4_CV void* l4dm_mem_allocate |
( |
l4_size_t |
size, |
|
|
l4_uint32_t |
flags | |
|
) |
| | |
Allocate memory.
- Parameters:
-
| size | Memory size |
| flags | Flags:
- L4DM_CONTIGUOUS allocate phys. contiguous memory
- L4DM_PINNED allocate pinned ("locked") memory
- L4RM_MAP map memory immediately
- L4RM_LOG2_ALIGNED find a aligned VM region
- L4RM_LOG2_ALLOC allocate the whole sized VM region
|
- Returns:
- Pointer to allocated memory, NULL if allocation failed.
Allocate memory at the default dataspace manager and attach to the address space. The access rights will be set to
L4DM_RW.
L4_CV void* l4dm_mem_allocate_named |
( |
l4_size_t |
size, |
|
|
l4_uint32_t |
flags, |
|
|
const char * |
name | |
|
) |
| | |
Allocate memory, name dataspace.
- Parameters:
-
| size | Memory size |
| flags | Flags:
- L4DM_CONTIGUOUS allocate phys. contiguous memory
- L4DM_PINNED allocate pinned ("locked") memory
- L4RM_MAP map memory immediately
- L4RM_LOG2_ALIGNED find a aligned VM region
- L4RM_LOG2_ALLOC allocate the whole sized VM region
|
| name | Dataspace name |
- Returns:
- Pointer to allocated memory, NULL if allocation failed.
Allocate named memory at the default dataspace manager and attach to the address space. The access rights will be set to
L4DM_RW.
L4_CV void* l4dm_mem_ds_allocate |
( |
l4_size_t |
size, |
|
|
l4_uint32_t |
flags, |
|
|
l4dm_dataspace_t * |
ds | |
|
) |
| | |
Allocate memory.
- Parameters:
-
| size | Memory size |
| flags | Flags:
- L4DM_CONTIGUOUS allocate phys. contiguous memory
- L4DM_PINNED allocate pinned ("locked") memory
- L4RM_MAP map memory immediately
- L4RM_LOG2_ALIGNED find a aligned VM region
- L4RM_LOG2_ALLOC allocate the whole sized VM region
|
- Return values:
-
- Returns:
- Pointer to allocated memory, NULL if allocation failed.
Allocate memory at the default dataspace manager, attach to the address space and return dataspace id. The access rights will be set to
L4DM_RW.
L4_CV void* l4dm_mem_ds_allocate_named |
( |
l4_size_t |
size, |
|
|
l4_uint32_t |
flags, |
|
|
const char * |
name, |
|
|
l4dm_dataspace_t * |
ds | |
|
) |
| | |
Allocate memory, name dataspace.
- Parameters:
-
| size | Memory size |
| flags | Flags:
- L4DM_CONTIGUOUS allocate phys. contiguous memory
- L4DM_PINNED allocate pinned ("locked") memory
- L4RM_MAP map memory immediately
- L4RM_LOG2_ALIGNED find a aligned VM region
- L4RM_LOG2_ALLOC allocate the whole sized VM region
|
| name | Dataspace name |
- Return values:
-
- Returns:
- Pointer to allocated memory, NULL if allocation failed.
Allocate named memory at the default dataspace manager and attach to the address space and return dataspace id. The access rights will be set to
L4DM_RW.
L4_CV void* l4dm_mem_ds_allocate_named_dsm |
( |
l4_size_t |
size, |
|
|
l4_uint32_t |
flags, |
|
|
const char * |
name, |
|
|
l4_threadid_t |
dsm_id, |
|
|
l4dm_dataspace_t * |
ds | |
|
) |
| | |
Allocate memory, name dataspace.
- Parameters:
-
| size | Memory size |
| flags | Flags:
- L4DM_CONTIGUOUS allocate phys. contiguous memory
- L4DM_PINNED allocate pinned ("locked") memory
- L4RM_MAP map memory immediately
- L4RM_LOG2_ALIGNED find a aligned VM region
- L4RM_LOG2_ALLOC allocate the whole sized VM region
|
| name | Dataspace name |
| dsm_id | Dataspace manager id |
- Return values:
-
- Returns:
- Pointer to allocated memory, NULL if allocation failed.
Allocate named memory at the specified dataspace manager and attach to the address space and return dataspace id. The access rights will be set to
L4DM_RW.
L4_CV void l4dm_mem_release |
( |
const void * |
ptr |
) |
|
Release memory.
- Parameters:
-
Release memory attached to
ptr.