MEMORY ALLOCATION ( DYNAMIC OR STATIC)
It all starts from a data that is stored in the memory , that data is given some memory .This Process of Giving memory is Called a memory allocation . The memory can be allocated in two manners : DYNAMICALLY AND STATICALLY .
STATIC MEMORY ALLOCATION
-This memory allocation process reserves fixed mount of memory before actual processing takes place , and because of that , the number of elements to be stored must be predetermined .
Such memory allocation process is basically called as static memory allocation .
-The Arrays are allocated memory by this process only.
DYNAMIC MEMORY ALLOCATION
-This Type of memory allocation process gives allocation of memry during the program execution itself, as and when it is needed.This process of allocating memory is called dynamic memory allocation .
-It also provides technique to release the memory , when memory is not required anymore.
-Data structures like Linked Lists and Tress use this very technique for their memory allocation.