Memory Allocation
[Dataspace Manager Client API]

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 $2^{log_2(size)+1}$ aligned VM region
  • L4RM_LOG2_ALLOC allocate the whole $2^{log_2(size)+1}$ 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 $2^{log_2(size)+1}$ aligned VM region
  • L4RM_LOG2_ALLOC allocate the whole $2^{log_2(size)+1}$ 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 $2^{log_2(size)+1}$ aligned VM region
  • L4RM_LOG2_ALLOC allocate the whole $2^{log_2(size)+1}$ sized VM region
Return values:
ds Dataspace descriptor
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 $2^{log_2(size)+1}$ aligned VM region
  • L4RM_LOG2_ALLOC allocate the whole $2^{log_2(size)+1}$ sized VM region
name Dataspace name
Return values:
ds Dataspace descriptor
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 $2^{log_2(size)+1}$ aligned VM region
  • L4RM_LOG2_ALLOC allocate the whole $2^{log_2(size)+1}$ sized VM region
name Dataspace name
dsm_id Dataspace manager id
Return values:
ds Dataspace descriptor
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:
ptr Memory area address
Release memory attached to ptr.


Generated on Wed Apr 11 06:37:12 2012 for L4Env Memory Dataspace Manager Interface by  doxygen 1.5.6