SPRUIG8J January 2018 – March 2024
The C/C++ compiler uses an uninitialized section called for the C run-time memory pool used by malloc(). You can set the size of this memory pool at link time by using the --heap_size option. The syntax for the --heap_size option is:
--heap_size= size
The size must be a constant. This example defines a 4K byte heap:
cl7x --run_linker --heap_size=0x1000 /* defines a 4k heap (.sysmem section)*/
The linker creates the section only if there is a section in an input file.
The linker also creates a global symbol, , and assigns it a value equal to the size of the heap. The default size is 1K bytes. See Section 12.6 for information about referring to linker symbols in C/C++ code.