Main Content

Memcpy threshold (bytes)


Specify the minimum array size in bytes for which memcpy and memset function calls should replace for loops for vector assignments in the generated code.

Category: Optimization


Default: 64


  • This parameter requires a Simulink® Coder™ license.

  • For the memcpy optimization, this parameter is enabled when you select Use memcpy for vector assignment.

Command-Line Information

Parameter: MemcpyThreshold
Type: integer
Value: valid quantity of bytes
Default: 64

Recommended Settings

DebuggingNo impact
TraceabilityNo impact
EfficiencyAccept default or determine target-specific optimal value
Safety precautionNo impact

Related Topics