three main storage areas

To simplify just a bit, there are basically three main storage areas you need to be concerned with:

  1. Global data -- a single static memory location outside the stack or heap. These are the variables declared not local to any function. (The distinction evident by the C/C++ "static" keyword is really just about which parts of the program are aware of the name of a global variable.)

  2. Stack data -- dynamic, but pushes and pops with function calls.

  3. Heap data -- the stuff returned by new/malloc, truly dynamic and the memory persists until a delete/free, rather than when functions exit.

原文链接: https://www.cnblogs.com/smartvessel/archive/2011/04/13/2014468.html

欢迎关注

微信关注下方公众号,第一时间获取干货硬货;公众号内回复【pdf】免费获取数百本计算机经典书籍

    three main storage areas

原创文章受到原创版权保护。转载请注明出处:https://www.ccppcoding.com/archives/23945

非原创文章文中已经注明原地址,如有侵权,联系删除

关注公众号【高性能架构探索】,第一时间获取最新文章

转载文章受原作者版权保护。转载请注明原作者出处!

(0)
上一篇 2023年2月8日 上午1:48
下一篇 2023年2月8日 上午1:48

相关推荐