ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Difference Stack vs Heap

Difference Stack vs Heap

原创 Linux操作系统 作者:fjmingyang 时间:2019-03-31 21:30:04 0 删除 编辑

Difference Stack vs Heap


Stack

When a function or a method calls another function which in turns calls another function etc., the execution of all those functions remains suspended until the very last function returns its value.

This chain of suspended function calls is the stack, because elements in the stack (function calls) depend on each other. 

The stack is important to consider in exception handling and thread executions. 

Heap
The heap is simply the memory used by programs to store variables. 
Element of the heap (variables) have no dependencies with each other and can always be accessed randomly at any time. 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/1698901/viewspace-612076/,如需转载,请注明出处,否则将追究法律责任。

下一篇: Undo Tablespace
请登录后发表评论 登录
全部评论

注册时间:2006-04-03

  • 博文量
    30
  • 访问量
    19154