Difference between Static v/s Dynamic memory allocation

Difference between Static v/s Dynamic memory allocation.



No. Static Memory Allocation Dynamic Memory Allocation
1 Memory is allocated before the execution of the program begins. Memory is allocated during the execution of the program.
2 No memory allocation or de-allocation actions are performed during execution. Memory Bindings are established and destroyed during the execution.
3 Variables remain permanently allocated. Allocated only when program unit is active.
4 Implemented using stacks and heaps. Implemented using data segments.
5 Pointer is needed to accessing variables. No need of dynamically allocated pointers.
6 Faster execution than dynamic. Slower execution than static.
7 More memory space required. Less memory space required.

Difference between Static v/s Dynamic memory allocation

Download the Android app to get all Government Job Notifications on your Mobile.
Download Now
Important: Please always Check and Confirm the above details with the official Advertisement / Notification.
Previous Post Next Post