Under which circumstances MATLAB Coder may create statically allocated variables in the generated code?
Show older comments
It is sought to generate code using MATLAB Coder that does not generate statically allocated data. It is mentioned in the documentation page,
the following:
"If you do not specify reentrant code, MATLAB® Coder™ generates code that uses statically allocated memory for:
- Function variables that are too large to fit on the stack
- Global variables
- Persistent variables"
However, when generating code from a custom MATLAB code that does not meet the latter requirements, the generated C/C++ code still contains statically allocated data.
Under which circumstances MATLAB Coder may create statically allocated variables in the generated code?
Accepted Answer
More Answers (0)
Categories
Find more on Simulink Coder in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!