Global

group Global_memoryManager

memoryManager globals

lorem

Macros

group Macros_memoryManager_h

Variables

group Variables_memoryManager_h

API’s

group Apis_memoryManager_h

Getters

group Getters_memoryManager_h

Setters

group Setters_memoryManager_h

General

group General_memoryManager_h

Functions

void memoryManager_stackInit(CosmOS_CoreConfigurationType *core)

Stack initialization for all thread type schedulables. This function cannot be called from the unprivileged context directly.

The implementation contains obtaining of the number of programs by calling core_getCoreNumberOfPrograms function with current core configuration. Then the for loop is implemented to iterate over all configured programs. In the for loop is implemented the core_getCoreProgramCfg call to get current program variable and subsequently call to the function program_getProgramNumberOfThreads to get number of threads configured under specific program. Then the nested for loop is implemented that iterates over all threads under the specific program variable and first of all obtains thread variable by calling program_getProgramThread then is this thread variable used to get schedulable variable by calling function thread_getThreadSchedulable because it is needed as an argument for the stack initialization function stackInit_schedulableStackInit that is called subsequently. After this point the stack pointer is stored to the schedulable structure by calling schedulable_setStackPointer.

Parameters

core[in] configuration pointer

Returns

none

void memoryManager_heapInit(CosmOS_CoreConfigurationType *core)

Heap initialization function for all programs. This function cannot be called from the unprivileged context directly.

The implementation contains obtaining of the program variables by callling the core_getCoreProgramCfgs function and the number of programs by calling core_getCoreNumberOfPrograms function with current core configuration. Then the for loop is implemented to iterate over all configured programs. In the for loop is implemented if condition to check if the heap size is non-zero value. Then the malloc variable is placed to the low address of the current program heap as initialization before the heap will be used.

Parameters

core[in] configuration pointer

Returns

none