How to compile simulink models with variables of big size in the simulink workspace?
4 次查看(过去 30 天)
显示 更早的评论
My model has a huge array stored in the simulink workspace and I am not able to compile my model with Simulink Coder.
I get the following memory error:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/314366/image.jpeg)
Any suggestions on how to fix this error?
0 个评论
回答(1 个)
Mark McBroom
2020-6-14
The problem is that the array is so big it causes the visdual studio compiler to fail due to lack of heap space. You can try to make adjustments to the compiler settings to make more heap space available.
In "Code generation" configuration settings, expand the "Tool chain details" array to see all flags used to compile and link the genrated code. You can try adding the /Zm switch to the compiler as described here. https://docs.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/fatal-error-c1060?view=vs-2019
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Environment Customization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!