Text : This portion contains the actual m/c instructions to be executed. On many Operating Systems this is set to read only, so that the process can't modify its instructions. This allows multiple instances of the program to share the single copy of the text.
Data : This portion contains the program's data part. It furthere divided into
1) Initialized Read Only Data : This contains the data elements that are initialized by the program and they are read only during the execution of the process.
2) Initialized Read Write Data : This contains the data elements that are initialized by the program and will be modified in the course of process execution.
3)Uninitalized Data : This contains the elements are not initialized by the program and are set 0 before the processes executes. These can also be modified and referred as BSS(Block Started Symbol). The adv of such elements are, system doesn't have to allocate space in the program file for this area, b'coz it is initialized to 0 by OS before the process begins to execute.
Stack: This portion is used for local variables, stack frames
Heap: This portion contains the dynamically allocated memory, it begins at the end of BSS.
In embedded software, the BSS segment is mapped into "Uninitialized RAM" that in fact is initialized to zero by the C runtime before main () is entered
Frank is a Software Engineer with rich experiences on messeging system, embedded system and communication system development. This is his work notes.
Wednesday, September 30, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment