Main Content

Automatically allocate static memory

Automatic static memory buffer allocation for external model communication

Since R2022b

Model Configuration Pane: Code Generation / Interface


The Automatically allocate static memory parameter specifies whether the code generator automatically allocates static memory for buffers used in external mode communication.

Enabling this parameter enables Maximum duration.

Disabling this parameter enables Static memory buffer size.


To enable this parameter, set the Transport layer parameter to XCP on TCP/IP or XCP on Serial.


On (default) | Off

Uses model information, including the Maximum duration value, to determine and allocate the static memory required for external mode communication buffers.


Uses the Static memory buffer size parameter to determine the amount of memory to allocate for external mode communication.

Recommended Settings

DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

Programmatic Use

Parameter: ExtModeAutomaticAllocSize
Type: character vector
Value: 'on' | 'off'
Default: 'on'

Version History

Introduced in R2022b