Static Memory Management:
When memory is allocated during compilation time, it is called ‘Static Memory Management’. This memory is fixed and cannot be increased or decreased after allocation. If more memory is allocated than requirement, then memory is wasted. If less memory is allocated than requirement, then program will not run successfully. So exact memory requirements must be known in advance.
Dynamic Memory Management:
When memory is allocated during run/execution time, it is called ‘Dynamic Memory Management’. This memory is not fixed and is allocated according to our requirements. Thus in it there is no wastage of memory. So there is no need to know exact memory requirements in advance.