bhadmanathan
Junior Member level 1
Hi,
A typical memory representation of C program consists of following sections.
1. Text segment (program)
2. Initialized data segment (static/global)
3. Uninitialized data segment (static/global)
4. Stack (local variables,function calls)
5. Heap (dynamic allocation)
out of these five, where
local volatile variables
global volatile variables
local const variables
global const variables
string literals
will get stored...?
Only Text segment is ROM or every region has its ROM..?
And also...
In which time , memory for a variable will get allocated ? compile time or run time ?
I heard that only syntax errors are checked during compile time and memory will be allocated during run time. I dont understand it clearly. If it is wrong please explain me clearly..
Thanks in advance
A typical memory representation of C program consists of following sections.
1. Text segment (program)
2. Initialized data segment (static/global)
3. Uninitialized data segment (static/global)
4. Stack (local variables,function calls)
5. Heap (dynamic allocation)
out of these five, where
local volatile variables
global volatile variables
local const variables
global const variables
string literals
will get stored...?
Only Text segment is ROM or every region has its ROM..?
And also...
In which time , memory for a variable will get allocated ? compile time or run time ?
I heard that only syntax errors are checked during compile time and memory will be allocated during run time. I dont understand it clearly. If it is wrong please explain me clearly..
Thanks in advance