Memory allocation
Tasks can only allocate memory blocks (including for new messages with non-zero size) from the allowed memory classes mentioned below. In addition, all blocks utilized within functions such as PxMcInsertBlk
, PxMcTakeBlk
and PxMcReturnBlk
must comply with MPU size and alignment specifications.
Allowed memory classes
Not allowed memory classes
Var-sized memory class
Due to the MPU requirements, messages or memory blocks cannot be allocated from var-sized memory classes in the ARM version of PXROS-HR. It is not allowed to create a var-sized memory class or request memory blocks or messages from this class. If attempted to do so, the error code PXERR_UNSUPPORTED_MCTYPE
is returned.
Further constraints due to MPU restrictions
-
Every memory range assigned to a task in the extended memory regions table is bound by MPU size and alignment constraints.
-
The
PxMsgSetData
andPxMsgSetSize
API functions do not modify the protection bounds according to the new data pointer and size but just change the values that are returned by the respective Get-functions.