Memory Organization of C-program

  • When the program is loaded into RAM, then the RAM will divide this program in 4 Block.
  1. Stack
  2. Heap
  3. Data
  4. Code

1. Stack :

  • The stack consists of an auto variable, Function return Address, and formal arguments.
  • Size of the Stack is 8MB.

2. Heap:

  • The on-demand memory, means Runtime memory.
  • We can do increment – decrement the memory of Heap.

3. Data:

  • Consist of Global Variable, Static variable and Function Symbol.
  • There are two different types of the section inside :
  • i. Uninitialized data section
  • ii. Initialized data section

4. Code:

  • Consist of Program Code (opcode).

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Powered by

Up ↑

%d bloggers like this: