Simulink Coder, cc1.exe error

조회 수: 28 (최근 30일)
Alexander
Alexander 2024년 11월 22일 10:16
답변: Kanishk 2024년 11월 22일 11:54
Hello. I am trying to compile a code of model for Veristand. I use GCC compiler for Veristand NI Linux real-time targets. Recently everything was ok, but when the model became larger I got the error “cc1.exe: out of memory allocating 4072 bytes””. Does anyone know how to fix it and don’t split the model on two models with smaller size? Thanks.

채택된 답변

Kanishk
Kanishk 2024년 11월 22일 11:54
The error message you are encountering, "cc1.exe: out of memory allocating 4072 bytes" suggests that the GCC compiler is running out of memory while trying to compile the model. Here are some strategies that might resolve this issue without splitting your model:
  • If you are compiling on a system with limited memory, consider increasing the available memory. This might involve closing other applications or processes that are consuming RAM.
  • You can try adjusting the compiler flags to optimize memory usage during compilation. For example, using optimization flags like '-O2' or '-O3' can sometimes help manage memory better, though they might increase compile time.
  • If your system supports it, enabling swap space can help when physical RAM is exhausted. This will allow your system to use disk space as additional memory.
Implementing one or a combination of these strategies should help to overcome the memory limitation issue during compilation.
Please go through this following official MATLAB documentation, to resolve out of memory errors.
Hope this helps

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by