This handler encapsulates functionality related to the management of the RTEMS Executive Workspace.
◆ _Workspace_Allocate()
void* _Workspace_Allocate |
( |
size_t |
size | ) |
|
Allocate memory from workspace.
This routine returns the address of a block of memory of size bytes. If a block of the appropriate size cannot be allocated from the workspace, then NULL is returned.
- Parameters
-
size | is the requested size |
- Return values
-
a | pointer to the requested memory or NULL. |
◆ _Workspace_Allocate_aligned()
void* _Workspace_Allocate_aligned |
( |
size_t |
size, |
|
|
size_t |
alignment |
|
) |
| |
Allocate aligned memory from workspace.
- Parameters
-
[in] | size | The size of the requested memory. |
[in] | alignment | The alignment of the requested memory. |
- Return values
-
NULL | Not enough resources. |
other | The memory area begin. |
◆ _Workspace_Allocate_or_fatal_error()
void* _Workspace_Allocate_or_fatal_error |
( |
size_t |
size | ) |
|
Workspace allocate or fail with fatal error.
This routine returns the address of a block of memory of size bytes. If a block of the appropriate size cannot be allocated from the workspace, then the internal error handler is invoked.
- Parameters
-
[in] | size | is the desired number of bytes to allocate |
- Return values
-
If | successful, the starting address of the allocated memory |
◆ _Workspace_Free()
void _Workspace_Free |
( |
void * |
block | ) |
|
Free memory to the workspace.
This function frees the specified block of memory. If the block belongs to the Workspace and can be successfully freed, then true is returned. Otherwise false is returned.
- Parameters
-
block | is the memory to free |
- Note
- If block is equal to NULL, then the request is ignored. This allows the caller to not worry about whether or not a pointer is NULL.
◆ _Workspace_Handler_initialization()
Initilize workspace handler.
This routine performs the initialization necessary for this handler.
◆ _Workspace_String_duplicate()
char* _Workspace_String_duplicate |
( |
const char * |
string, |
|
|
size_t |
len |
|
) |
| |
Duplicates string with memory from the workspace.
- Parameters
-
[in] | string | is the pointer to a zero terminated string. |
[in] | len | is the length of the string (equal to strlen(string)). |
- Return values
-
NULL | Not enough memory. |
other | Duplicated string. |
◆ _Workspace_Area
Executive workspace control.
This is the heap control structure used to manage the RTEMS Executive Workspace.