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:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

w

Connecting to %s

Powered by WordPress.com.

Up ↑

%d bloggers like this: