变量存储在哪里? [英] where variables are stored?

查看:73
本文介绍了变量存储在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

全局,静态,本地,寄存器变量,空闲内存和C

程序指令存储在哪里?


-Neo

Where does global, static, local, register variables, free memory and C
Program instructions get stored?

-Neo

推荐答案



" Neo" < TI *************** @ yahoo.com>写在消息

新闻:34 ************* @ individual.net ...

"Neo" <ti***************@yahoo.com> wrote in message
news:34*************@individual.net...
全球,静态,本地,寄存器变量,空闲存储器和程序指令是否存储?
Where does global, static, local, register variables, free memory and C
Program instructions get stored?




在很大程度上取决于你的编译器/操作系统。


本地人通常存储在堆栈或寄存器中,全局初始化数据包含在某些.data段中的未初始化数据,。bss段中的未初始化数据。但那只是grosso modo,而不是bros modo。回答,因为没有一般有效的。


您的编译器可能会将它存储在不同的段中,但这个想法将与

完全相同。



Depends largely on your compiler/OS.

Locals are usually stored on stack or registers, global initialized data in
some ''.data'' segment, uninitialized data in the ''.bss'' segment. But that''s a
mere "grosso modo" answer, since there is no generally valid one.

Your compiler may store it in different segments, but the idea will be
pretty much the same.


Neo写道:

全局,静态,本地,寄存器变量,可用内存和C程序指令在哪里?存储?

Where does global, static, local, register variables, free memory
and C Program instructions get stored?




无关紧要,只要这些实体的行为符合

标准中的规定。据你所知,精灵们可以在一些小块的纸上划开笔记并将它们传递给其他精灵阅读。


-

Chuck F(cb********@yahoo.com)(cb********@worldnet.att.net)

可供咨询/临时嵌入式和系统。

< http://cbfalconer.home.att.net>使用worldnet地址!



It doesn''t matter, so long as those entities behave as specified in
the standard. Elves can scratch notes on little bitty pieces of
paper and pass them to other elves for reading, as far as you know.

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!


< posted&邮寄>


Neo写道:
<posted & mailed>

Neo wrote:
全局,静态,本地,寄存器变量,空闲内存和C
程序指令在哪里得到存储?


那就是编译器/操作环境的恶化。 C没有

要求你需要知道。


-Neo
Where does global, static, local, register variables, free memory and C
Program instructions get stored?
That''s at the disgression of the compiler / operating environment. C doesn''t
require you to need to know that.


-Neo




-

从电子邮件地址中删除''.nospam''以通过电子邮件回复



--
Remove ''.nospam'' from e-mail address to reply by e-mail


这篇关于变量存储在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆