Use dynamic memory allocation for model initialization
Description
Control how the generated code allocates memory for model data.
Category: Code Generation > Interface
Settings
Default: off
On
Generates a function to dynamically allocate memory (using
malloc
) for model data structures.Off
Does not generate a dynamic memory allocation function. The generated code statically allocates memory for model data structures.
Dependencies
This parameter only appears for ERT-based targets with Code interface packaging set to
Reusable function
.This parameter requires an Embedded Coder® license when generating code.
Command-Line Information
Parameter:
GenerateAllocFcn |
Type: character vector |
Value:
'on' | 'off' |
Default:
'off' |
Recommended Settings
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | No impact |
Safety precaution | No recommendation |