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.

Memory management

Genius 5820 points

May be I missed something so let me ask this stupid question: when using Starterware there is no memory management available, means I can't allocate a new buffer using malloc(), right?

Based on this assumption I reserved a memory area by defining a large global array where I store my data into.

The resulting ELF-file had a reasonyble size but the TI-hex-file that is loaded to the RAM becomes very big just because of this large array inside my code.

So...is this really the correct way of allocating/reserving such a buffer?

Thanks!

  • There is no memory management in StarterWare.

    Is your global array is in data section ? if so consider moving it to bss section. So that the load time is reduced and the bss section will be initialized during startup.

    Other option is to allocate heap mamory, but you need to define its usage and manage carefully.

    regards

    baskaran