Static allocation vs. Dynamic allocation vs. Automatic allocation

后端 未结 2 1611
渐次进展
渐次进展 2020-12-15 10:24

What are the differences among static, dynamic, and automatic allocation?

2条回答
  •  粉色の甜心
    2020-12-15 10:59

    Static allocation is memory that has been set aside for an application when it is first loaded. This section of memory is kept to be only used with that application, and is made available again once the program is closed.

    Dynamic allocation is memory that is allocated as needed, and deallocated/released when it is no longer needed. Heaps and stacks are examples of areas of memory that can be dynamically allocated.

提交回复
热议问题