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.

Compiler: Virtual destructor automatically creating heap section

Other Parts Discussed in Thread: TMS320F28054M, C2000WARE

Tool/software: TI C/C++ Compiler

Hi all,

I'm developing a bare-metal C++ program for the TMS320F28054M, and am building my project with the TMS320C2000 C/C++ Compiler v20.2.2.LTS. I've noticed that whenever I instantiate a class with a virtual destructor, the toolchain automatically generates an 1KB .esysmem section for the heap. This is strange, since I'm not actually using dynamic memory at all; in fact, this happens even when creating a variable on the stack.

Is this a compiler bug? I'm not that familiar with the innerworkings of virtual destructors, so maybe it's something to be expected.

  • I'm confident you have the same problem discussed in this forum thread.  

    One possible solution is to use the newer EABI instead of the default COFF ABI.  If all of the other code you use (C2000Ware etc.) supports EABI, then this could work for you.

    Otherwise, that forum post details another solution which requires redefining the operator new.

    Thanks and regards,

    -George