Direct stack and heap access; Virtual- or hardware- level?

守給你的承諾、 提交于 2019-12-06 05:51:44

You are correct in that the C spec doesn't require the use of a heap or stack, as long as it implements the storage classes correctly.

However, virtually every compiler will use stacks for automatic variables and heaps for allocated variables. While you could implement a compiler that doesn't use a stack or heap, it probably wouldn't perform very well and wouldn't be familiar to most devs.

So when people say "always", they really mean "virtually always".

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!