SPNU118Z September 1995 – March 2023 66AK2E05 , 66AK2H06 , 66AK2H12 , 66AK2H14 , AM1705 , AM1707 , AM1802 , AM1806 , AM1808 , AM1810 , AM5K2E04 , C346BA02 , C348A01 , CS241C01-Q1 , CS241C05-Q1 , CS246C01-Q1 , CS348C02-Q1 , OMAP-L132 , OMAP-L137 , OMAP-L138 , S470AV336LYSQRB , TMS470R1A288 , TMS470R1A384 , TMS470R1A64 , TMS470R1B1M , TMS470R1B512 , TMS470R1B768
The C/C++ compiler uses an uninitialized section called .sysmem 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:
armcl --run_linker --heap_size=0x1000 /* defines a 4k heap (.sysmem section)*/
The linker creates the .sysmem section only if there is a .sysmem section in an input file.
The linker also creates a global symbol, __TI_SYSMEM_SIZE, and assigns it a value equal to the size of the heap. The default size is 2K bytes. See Section 8.6 for information about referring to linker symbols in C/C++ code.