Dynamic Memory Allocation

Drawbacks of Dynamic Memory Allocation

1) It might cause memory leak when a programmer heedlessly forgets to free unused memory.
2) It might cause memory segmentation when we allocate many variables with various size.
3) It costs longer time to allocate memory than local and static memory, because operating system needs to search for free space in heap section to allocate the data.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License