RTEMS  5.1
Files | Functions | Variables
Workspace Handler

Files

file  wkspace.h
 Information Related to the RAM Workspace.
 
file  wkspacedata.h
 Constants defined by the application configuration for the idle threads.
 
file  wkspace.c
 Workspace Handler Support.
 
file  wkstringduplicate.c
 Duplicates String with Memory from the Workspace.
 

Functions

void _Workspace_Handler_initialization (const Memory_Information *mem, Heap_Initialization_or_extend_handler extend)
 Initilizes the workspace handler. More...
 
void * _Workspace_Allocate (size_t size)
 Allocates a memory block of the specified size from the workspace. More...
 
void _Workspace_Free (void *block)
 Frees memory to the workspace. More...
 
char * _Workspace_String_duplicate (const char *string, size_t len)
 Duplicates string with memory from the workspace. More...
 

Variables

Heap_Control _Workspace_Area
 Executive workspace control. More...
 
const uintptr_t _Workspace_Size
 The workspace size in bytes. More...
 
const bool _Workspace_Is_unified
 Indicates if the workspace and C program heap are unified. More...
 

Detailed Description

This handler encapsulates functionality related to the management of the RTEMS Executive Workspace.

Function Documentation

◆ _Workspace_Allocate()

void* _Workspace_Allocate ( size_t  size)

Allocates a memory block of the specified size from the workspace.

Parameters
sizeThe size of the memory block.
Return values
pointerThe pointer to the memory block. The pointer is at least aligned by CPU_HEAP_ALIGNMENT.
NULLNo memory block with the requested size is available in the workspace.

◆ _Workspace_Free()

void _Workspace_Free ( void *  block)

Frees memory to the workspace.

This function frees the specified block of memory.

Parameters
blockThe 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()

void _Workspace_Handler_initialization ( const Memory_Information mem,
Heap_Initialization_or_extend_handler  extend 
)

Initilizes the workspace handler.

This routine performs the initialization necessary for this handler.

Parameters
memThe memory information
extendThe extension handler for the new workspace.

◆ _Workspace_String_duplicate()

char* _Workspace_String_duplicate ( const char *  string,
size_t  len 
)

Duplicates string with memory from the workspace.

Parameters
stringThe pointer to a zero terminated string.
lenThe length of the string (equal to strlen(string)).
Return values
otherDuplicated string.
NULLNot enough memory.

Variable Documentation

◆ _Workspace_Area

Heap_Control _Workspace_Area

Executive workspace control.

This is the heap control structure used to manage the RTEMS Executive Workspace.

◆ _Workspace_Is_unified

const bool _Workspace_Is_unified

Indicates if the workspace and C program heap are unified.

This constant is defined by the application configuration via <rtems/confdefs.h>.

◆ _Workspace_Size

const uintptr_t _Workspace_Size

The workspace size in bytes.

This constant is defined by the application configuration via <rtems/confdefs.h>.