View
59
Download
0
Embed Size (px)
Citation preview
Data Allocation
• Blocks of code and data can be allocated in memory within sections specified in
• the linker command file. These sections can be either initialized or uninitialized.
• Initialized or uninitialized sections, except .text, cannot be allocated into internal
• program memory.
• The initialized sections are:• 1. .cinit: for global and static variables• 2. .const: for global and static constant variables• 3. .switch: contains jump tables for large switch statements• 4. .text: for executable code and constants• The uninitialized sections are:• 1. .bss: for global and static variables• 2. .far: for global and static variables declared far• 3. .stack: allocates memory for the system stack• 4. .sysmem: reserves space for dynamic memory allocation
used by the malloc, calloc, and realloc functions
Data Alignment
• The C6x always accesses aligned data which allows it to address bytes, half-words, and words (32 bits)