Main Content

Reuse buffers of different sizes and dimensions

Reduce memory consumption by reusing buffers to store data of different sizes and dimensions.

Settings

Default: On

On

The code generator tries to reuse the same buffers to store data of different sizes and dimensions. This optimization conserves RAM and ROM consumption.

Off

The code generator reuses buffers only if they have the same size and shape as the data.

Dependencies

  • This parameter appears only for ERT-based targets.

  • When generating code, this parameter requires an Embedded Coder® license.

  • This parameter is enabled by Signal storage reuse.

Tips

  • If your model contains a reusable custom storage class to specify reuse on signals that have different sizes and shapes, you must select the Reuse buffers of different sizes and dimensions parameter or remove the specification. Otherwise, during simulation, the model produces an error.

  • The code generator does not replace a buffer with a lower priority buffer that has a smaller size.

  • The code generator does not reuse buffers that have different sizes and symbolic dimensions.

Command-Line Information

Parameter: DifferentSizesBufferReuse
Value: 'on' | 'off'
Default: 'off'

Recommended Settings

ApplicationSetting
Debuggingoff
Traceabilityoff
Efficiencyon
Safety precautionNo impact

Related Topics