3
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.

Memory

Embed Size (px)

Citation preview

Page 1: Memory

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.

Page 2: 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

Page 3: Memory

Data Alignment

• The C6x always accesses aligned data which allows it to address bytes, half-words, and words (32 bits)