Main Content

Signal storage reuse

Reuse signal memory

Model Configuration Pane: Code Generation / Optimization

Description

The Signal storage reuse parameter instructs the code generator to reuse buffers allocated to store block input and output signals whenever possible.

Settings

on (default) | off
On

Simulink® software reuses memory buffers allocated to store block input and output signals, reducing the memory requirement of your real-time program.

Off

Simulink software allocates a separate memory buffer for each block's outputs. This makes all block outputs global and unique, which in many cases significantly increases RAM and ROM usage.

Tips

  • This option applies only to signals with storage class Auto.

  • Signal storage reuse can occur only among signals that have the same data type.

  • Clearing this option can substantially increase the amount of memory required to simulate large models.

  • Clear this option if you need to:

    • Debug a C-MEX S-function

    • Use a Floating Scope or a Floating Scope block with the Floating display option selected to inspect signals in a model that you are debugging

  • Simulink software opens an error dialog if Signal storage reuse is enabled and you attempt to use a Floating Scope or floating Display block to display a signal whose buffer has been reused.

Recommended Settings

ApplicationSetting
DebuggingOff
TraceabilityOff
EfficiencyOn
Safety precautionNo impact

Programmatic Use

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

Version History

Introduced in R2007a