This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Out of Memory error using Code Composer Studio

I am receiving an "OUT OF MEMORY - APPLICATION ABORTED" error after about 40 minutes of build time.  I am executing the compiler from the DOS command line as "cl6x -c --symdebug:coff -O3 -pdsw225 -mv6400 ...".  I can watch the memory usage in the task manager and see that the cg6x process that is spawned by the cl6x process dies when it requires around 1.2 GBs of memory.  However, I am building under the \3GB switch in Windows XP and I have several 100 MBs of memory available when the process dies.  I am using CCSv3.3 on a Windows XP system with 4GB of RAM booted with the \3GB switch.  Any suggestions?

  • I've never seen/heard of a file taking so much time or memory to compile.  How many lines of code is the file?  Do other files compile ok?  Can someone else try compiling the same file on a different machine?

  • I once saw a project that would do this, of course at the time the laptop only had 512MB of RAM and it saturated and killed the compiler like that. I imagine your project built up until a certain point, and just recently this happened? It is possible that there is something in the code that is confusing the optimizer which was recently added, so you may be able to resolve this by tweaking whatever you have recently added to be coded slightly differently to see if that fixes it. Typically when it overflows like this it is some problem at the optimization step, so one way to get it to build will likely be to turn down the -o3 option to a lower optimization setting, or turrning it off altogether. Beyond this you may want to upgrade your code generation tools, if you are using an older version it is possible that this is being caused by a bug that has since been fixed.

    EDIT: You may also try removing the debug information flag, that has been known to bloat the compiler's memory requirements if you have lots of large structures with large names.

  • I have seen compiler problems in the past which caused the compiler to crash because of Windows memory problems, but I believe they have been fixed.

    What version of the compiler are you using? It could be the problem has been corrected in a newer version.

    If this is a new problem we would like to get it fixed.

    If you are able to send an example (compile the c file with the -ppo option ... the compiler will copy the .c file to a .pp file, including all header files need to compile and stripping all comments.), send an email to support@ti.com saying you are submitting a compiler problem for Harry Thompson to look at. I can then communicate with you via email and get the .pp file.

    Thanks
    Harry

  • Hello Harry,

    i have the same problem. I'm using some parts of the boost-library (www.boost.org) in my project.

    The library can be compiled, but when trying to compile some examples (e.g. from serialization), the linker aborts after some time with the out of mem. message mentioned above.

    It seems for me, that the large number of template-instantiations may be a problem for the compiler / linker.

    I'm using cgtools 6.1.8 for C6000, exceptions and rtti are enabled.

    Is there already a solution for the problem ?

     

    Thanks and best regards,

    Enrico Zschau

     

  • Sorry for the delay.  I thought the forum would email me if I got a reply.  The file that it is dying on is only 807KB in size.  Yes, I have actually compiled an earlier version of this same model several months ago.  Yes, I have tried compiling the model on three different machines to no avail.  After a collegue of mine looked at the problem, it seems to point to the inlining of functions.  If inlining is turned off via the '-pi -oi0' flags the model compiles.  However, using these options with any size except zero does not seem to work.  Does this make sense?  I thought that I could set an inlining threshold but I obviously do not know how to set up the compiler options.  Unfortunately the code is sensitive and I cannot release it to you as an example.

    Thanks.

  • Let me see if I can sanitize the code so that I can release it to you.  I will get back to you when I get an acceptable *.pp file.

  • Is there a solution for  the problem?I have also met the error.

    I thoutht the Task of my project is too big, then I change the stack size of task,but it does not work.

    It also seems that the compile shows the error"out of memory- appliction aborted" when the cg6x.exe is lager than 1.3GB or so.The version of code generation is V6.0.27.

    Could you help me?