Read-only memory(Flash)
Data Section
int data_variable = 500;
Read-only date
constant
const int read_only_variable = 2000;
Text(code)
“literal pool” may in the function.
void my_function(void){
int x;
x = 200;
printf("X is %d\n", x);
}
Read-Write Data(RAM)
Data section
int data_var = 500; //require flash memory to stored.
BSS section
int bss_var0;
int bss_var1 = 0;//doesn’t need require flash memory to stored.
Heap section
static int static_var;
buffer = malloc(512);
Stack section
int my_function(int a, int b, int c, int d)
Reference
No comments:
Post a Comment