Memory Management



Total memory allocation of a Program are divided into 4 parts
  1.  Instruction
  2. Data
  3. Stack
  4.  Heap
what they store ?
  • Instruction  --- store all lines and instruction in program .
  • Data --   global and static variable.
  • Stack--  function , local , variable, variable in  function ,recursion time memory
                          and loop (any memory that are needed for operation)
                          time and various memory that are required at time while performing job .
  • Heap -- dynamic created memory.(by malloc , new ) 
  1. Instruction  and Data

    both memory size are fix at the time of program start .
2. Stack and Heap
 
  memory consumption change throughout the program.

Comments

Popular posts from this blog

Difficulty in Learning Programming Languages? Follow these guided steps

WHAT IS INSERTION SORT ?

Why coding and programming are in trend and what's the difference?